Skip to content

Commit

Permalink
Fix typo which had broken writing of files (regression from 1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Apr 13, 2018
1 parent 7d7cc27 commit ec34fe7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog for replacer

*replacer-1.2
Martin Väth <martin at mvath.de>:
- Fix typo which had broken writing of files (regression from 1.1)

*replacer-1.1
Martin Väth <martin at mvath.de>:
- Provide --encoding-fallback
Expand Down
4 changes: 2 additions & 2 deletions bin/replacer
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_parser():
r'“raw” strings.'
p = argparse.ArgumentParser(description=d)
a = p.add_argument
a('-V', '--version', action='version', version='%(prog)s 1.1')
a('-V', '--version', action='version', version='%(prog)s 1.2')
a('-B', '--before', type=int, default=0,
help=r'add lines of context before match')
a('-A', '--after', type=int, default=0,
Expand Down Expand Up @@ -604,7 +604,7 @@ class Action:
except Exception as e:
stat = None
warn('cannot get timestamp of {0}: {1}'.format(filename, e))
if self._write_encoding_override:
if self._encoding_override is not None:
encoding = self._encoding_override
else:
encoding = self._encoding
Expand Down

0 comments on commit ec34fe7

Please sign in to comment.