Fix errno.ESPIPE error handler
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 25 Jan 2020 17:40:53 +0000 (18:40 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 27 Jan 2020 17:23:24 +0000 (18:23 +0100)
pylint complained:
crypto.py:1632:28: E1101: Module 'os' has no 'errno' member (no-member)

deltatar/crypto.py

index ccec5e4..b0c863c 100755 (executable)
@@ -139,6 +139,7 @@ import stat
 import sys
 import time
 import types
+import errno
 try:
     import enum34
 except ImportError as exn:
@@ -1629,7 +1630,7 @@ def depdtcrypt (mode, secret, ins, outs):
         try:
             return s.tell ()
         except OSError as exn:
-            if exn.errno == os.errno.ESPIPE:
+            if exn.errno == errno.ESPIPE:
                 return -1
 
     def out (pt, outfile):