mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
tools/upip.py: Use .errno instead of .args[0] for OSError exceptions.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -60,7 +60,7 @@ def _makedirs(name, mode=0o777):
|
|||||||
os.mkdir(s)
|
os.mkdir(s)
|
||||||
ret = True
|
ret = True
|
||||||
except OSError as e:
|
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
|
raise e
|
||||||
ret = False
|
ret = False
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Reference in New Issue
Block a user