[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:
Fabio Erculiani
2011-04-25 23:38:15 +02:00
parent 8412fa8358
commit cc1073f033
+2
View File
@@ -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):