chiark / gitweb /
fishdescriptor: Use Python "errno" module
[chiark-utils.git] / fishdescriptor / py / fishdescriptor / fish.py
index dcb7c32ac817a3bcbfb2cc50a803933938c6e69a..7588010d6833b976e0f255a1f1aa3f14f25c9d53 100644 (file)
@@ -29,6 +29,7 @@ import struct
 import tempfile
 import shutil
 import sys
+import errno
 
 def _shuffle_fd3():
     os.dup2(1,3)
@@ -111,7 +112,7 @@ class Donor():
             os.stat(path)
             return True
         except OSError as oe:
-            if oe.errno != os.errno.ENOENT: raise oe
+            if oe.errno != errno.ENOENT: raise oe
             return False
 
     def _sock_dir(d, target_euid, target_root):