use symbolic constant for errno
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Tue, 15 Aug 2017 12:42:35 +0000 (14:42 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:09 +0000 (13:34 +0200)
deltatar/crypto.py

index 16c50d1..25cf8d9 100755 (executable)
@@ -1377,11 +1377,11 @@ def depdtcrypt (mode, secret, ins, outs):
 
 
     def tell (s):
-        """ESPIPE is normal on stdio stream."""
+        """ESPIPE is normal on non-seekable stdio stream."""
         try:
             return s.tell ()
         except OSError as exn:
-            if exn.errno == 29:
+            if exn.errno == os.errno.ESPIPE:
                 return -1
 
     def out (pt, outfile):