From b09a99eb7215a375f3109810995008c68df1ae37 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 15 Aug 2017 14:42:35 +0200 Subject: [PATCH] use symbolic constant for errno --- deltatar/crypto.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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): -- 1.7.1