summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-23 06:29:02 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-23 06:29:02 -0500
commit54b6c9b9189cdd4575a41158ad6159a92753e159 (patch)
treebc2d849555ba8da53a687100004455060dab1767
parent25a52ab0a3c673c2f05b1c976f9345115d1baa22 (diff)
downloadpython-coveragepy-54b6c9b9189cdd4575a41158ad6159a92753e159.tar.gz
Make this runnable on Python 3
-rw-r--r--igor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/igor.py b/igor.py
index 5eed9bb..b82fc96 100644
--- a/igor.py
+++ b/igor.py
@@ -261,13 +261,13 @@ def do_check_eol():
with open(fname, "rb") as f:
for n, line in enumerate(f, start=1):
if crlf:
- if "\r" in line:
+ if b"\r" in line:
print("%s@%d: CR found" % (fname, n))
return
if trail_white:
line = line[:-1]
if not crlf:
- line = line.rstrip('\r')
+ line = line.rstrip(b'\r')
if line.rstrip() != line:
print("%s@%d: trailing whitespace found" % (fname, n))
return