summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/file_types.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/file_types.py b/util/file_types.py
index 85e058db0..14d198bd6 100644
--- a/util/file_types.py
+++ b/util/file_types.py
@@ -140,7 +140,10 @@ def update_file(dst, src, language, mutator):
if isinstance(src, str):
# if a filename was provided, open the file
- mode = 'r+' if inplace else 'r'
+ if inplace:
+ mode = 'r+'
+ else:
+ mode = 'r'
src = file(src, mode)
orig_lines = []