~veebers/juju-ci-tools/migration-add-migrate-back-to-original

« back to all changes in this revision

Viewing changes to check_tar.py

  • Committer: Aaron Bentley
  • Date: 2016-10-18 14:32:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1658.
  • Revision ID: aaron.bentley@canonical.com-20161018143211-45p41hpwx9bzqrs6
Skip check on 1.x

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import os
5
5
import tarfile
6
6
from textwrap import dedent
 
7
import re
7
8
import sys
8
9
 
9
10
 
43
44
 
44
45
    tar_filename is the filename of the tarfile.
45
46
    """
 
47
    base_tar_name = os.path.basename(tar_filename)
 
48
    if re.match(r'juju-core_1\..*\.tar.gz', base_tar_name) is not None:
 
49
        logging.info(
 
50
            'Juju 1 does not use fallback-public-cloud.yaml.  Skipping.')
 
51
        return 0
46
52
    try:
47
53
        tf = tarfile.open(tar_filename, 'r:*')
48
54
    except FileNotFoundError: