From 952de5cb77208f519a88752cd5de43337686f7f4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 26 Jul 2020 10:56:24 +1000 Subject: [PATCH] tools/makemanifest.py: Use errno.EEXIST instead of number 17. To make this code more portable, across different platforms. Signed-off-by: Damien George --- tools/makemanifest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/makemanifest.py b/tools/makemanifest.py index babce7fa73..6779198c47 100644 --- a/tools/makemanifest.py +++ b/tools/makemanifest.py @@ -25,6 +25,7 @@ # THE SOFTWARE. from __future__ import print_function +import errno import sys import os import subprocess @@ -171,7 +172,7 @@ def mkdir(path): try: os.mkdir(cur_path) except OSError as er: - if er.args[0] == 17: # file exists + if er.args[0] == errno.EEXIST: pass else: raise er