mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Move compression fall-back operation
This commit is contained in:
parent
c74a6389ad
commit
dc7a1cc293
@ -298,6 +298,9 @@ def gen_thin(cachedir, extra_mods='', overwrite=False, so_mods='',
|
||||
'''
|
||||
if sys.version_info < (2, 6):
|
||||
raise salt.exceptions.SaltSystemExit('The minimum required python version to run salt-ssh is "2.6".')
|
||||
if compress not in ['gzip', 'zip']:
|
||||
log.warning('Unknown compression type: "%s". Falling back to "gzip" compression.', compress)
|
||||
compress = 'gzip'
|
||||
|
||||
thindir = os.path.join(cachedir, 'thin')
|
||||
if not os.path.isdir(thindir):
|
||||
@ -390,10 +393,6 @@ def gen_thin(cachedir, extra_mods='', overwrite=False, so_mods='',
|
||||
log.error(tops_failure_msg, 'collecting', python2_bin)
|
||||
log.debug(stderr)
|
||||
|
||||
if compress not in ['gzip', 'zip']:
|
||||
compress = 'gzip'
|
||||
log.warning('Unknown compression type: "%s". Falling back to "gzip" compression.', compress)
|
||||
|
||||
if compress == 'gzip':
|
||||
tfp = tarfile.open(thintar, 'w:gz', dereference=True)
|
||||
elif compress == 'zip':
|
||||
|
Loading…
Reference in New Issue
Block a user