Replace EnvironmentError with OSError

See 527ff0238a9b607857d98eddade18450bdc4ad73.
This commit is contained in:
Luflosi 2020-07-01 22:39:01 +02:00
parent 9f751d8715
commit cad1c12b7b
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

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)