[elbe-devel] [PATCH v2 8/9] filesystem: Change os.errno to errno module

Olivier Dion dion at linutronix.de
Mon May 4 20:00:11 CEST 2020


errno is in its own module and not in os since python3.

Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/filesystem.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
index 3dac75ff..a77c8dba 100644
--- a/elbepack/filesystem.py
+++ b/elbepack/filesystem.py
@@ -8,6 +8,7 @@ from __future__ import print_function
 
 import os
 import shutil
+import errno
 
 from glob import glob
 from tempfile import mkdtemp
@@ -144,7 +145,7 @@ class Filesystem(object):
         try:
             os.symlink(src, self.fname(path))
         except OSError as e:
-            if e.errno != os.errno.EEXIST:
+            if e.errno != errno.EEXIST:
                 raise
             elif not allow_exists:
                 raise
-- 
2.26.2




More information about the elbe-devel mailing list