tools/upip.py: Use .errno instead of .args[0] for OSError exceptions.

Signed-off-by: Damien George <damien@micropython.org>
pull/7136/head
Damien George 2021-04-20 17:11:59 +10:00
rodzic 3c4bfd1dec
commit ac1d01d43e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -60,7 +60,7 @@ def _makedirs(name, mode=0o777):
os.mkdir(s)
ret = True
except OSError as e:
if e.args[0] != errno.EEXIST and e.args[0] != errno.EISDIR:
if e.errno != errno.EEXIST and e.errno != errno.EISDIR:
raise e
ret = False
return ret