mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
unarchive: fix @bcoca's remarks, issue #1575
This commit is contained in:
parent
432764b703
commit
6acfa5fcee
1 changed files with 1 additions and 4 deletions
|
@ -303,10 +303,7 @@ def main():
|
||||||
# skip working with 0 size archives
|
# skip working with 0 size archives
|
||||||
try:
|
try:
|
||||||
if os.path.getsize(src) == 0:
|
if os.path.getsize(src) == 0:
|
||||||
res_args = {
|
module.fail_json(msg="Invalid archive '%s', the file is 0 bytes" % src)
|
||||||
'changed': False
|
|
||||||
}
|
|
||||||
module.exit_json(**res_args)
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
module.fail_json(msg="Source '%s' not readable" % src)
|
module.fail_json(msg="Source '%s' not readable" % src)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue