Couple of patches for Travis

This commit is contained in:
Miroslav Stampar
2019-05-09 14:10:18 +02:00
parent 7ddb8f7cbe
commit a286734c57
4 changed files with 33 additions and 13 deletions

View File

@@ -68,10 +68,7 @@ def purge(directory):
except:
pass
if six.PY2:
dirpaths.sort(cmp=lambda x, y: y.count(os.path.sep) - x.count(os.path.sep))
else:
dirpaths.sort(key=functools.cmp_to_key(lambda x, y: y.count(os.path.sep) - x.count(os.path.sep)))
dirpaths.sort(key=functools.cmp_to_key(lambda x, y: y.count(os.path.sep) - x.count(os.path.sep)))
logger.debug("renaming directory names to random values")
for dirpath in dirpaths: