Commit 952de5cb authored by Damien George's avatar Damien George

tools/makemanifest.py: Use errno.EEXIST instead of number 17.

To make this code more portable, across different platforms.
Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 441460d8
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# THE SOFTWARE. # THE SOFTWARE.
from __future__ import print_function from __future__ import print_function
import errno
import sys import sys
import os import os
import subprocess import subprocess
...@@ -171,7 +172,7 @@ def mkdir(path): ...@@ -171,7 +172,7 @@ def mkdir(path):
try: try:
os.mkdir(cur_path) os.mkdir(cur_path)
except OSError as er: except OSError as er:
if er.args[0] == 17: # file exists if er.args[0] == errno.EEXIST:
pass pass
else: else:
raise er raise er
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment