Replace EnvironmentError with OSError

See 527ff0238a.
This commit is contained in:
Luflosi
2020-07-01 22:39:01 +02:00
parent 9f751d8715
commit cad1c12b7b

View File

@@ -165,7 +165,7 @@ def create_tarfile(env, compression_level='9'):
base = OUTPUT_DIR
try:
shutil.rmtree(base)
except EnvironmentError as err:
except OSError as err:
if err.errno != errno.ENOENT:
raise
os.mkdir(base)