file_types: Make code work in Python 2.4
This commit is contained in:
parent
915f49ae92
commit
a2889ef16d
1 changed files with 4 additions and 1 deletions
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue