From: Philipp Gesang Date: Tue, 15 Aug 2017 12:42:35 +0000 (+0200) Subject: use symbolic constant for errno X-Git-Tag: v2.2~7^2~65 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=b09a99eb7215a375f3109810995008c68df1ae37;p=python-delta-tar use symbolic constant for errno --- diff --git a/deltatar/crypto.py b/deltatar/crypto.py index 16c50d1..25cf8d9 100755 --- a/deltatar/crypto.py +++ b/deltatar/crypto.py @@ -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):