[entropy.tools] uncompress_tarball: if catch_empty is True, return 0 if os.listdir() is empty.
Blame Python 2.7 devs for having changed tarfile functions contract
This commit is contained in:
@@ -2029,6 +2029,8 @@ def uncompress_tarball(filepath, extract_path = None, catch_empty = False):
|
||||
|
||||
if os.listdir(extract_path):
|
||||
return 0
|
||||
if catch_empty:
|
||||
return 0
|
||||
return -1
|
||||
|
||||
def bytes_into_human(xbytes):
|
||||
|
||||
Reference in New Issue
Block a user