diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index ff5eb0d..8b43e48 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -28,7 +28,7 @@ def main(argv): with open(filetoconvert, 'x') as f: with open(filecopy) as c: - print("Detected %s instances of %s pre-conversion"%(c.count(pattern),pattern)) + print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) converted = c.read().replace(pattern, substitute) print("Confirmed %s instances of %s post-conversion"%s(converted.count(substitute),substitute)) f.write(converted)