projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
915f49a
)
file_types: Make code work in Python 2.4
author
Nathan Binkert
<nate@binkert.org>
Sun, 17 Apr 2011 20:57:03 +0000
(13:57 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Sun, 17 Apr 2011 20:57:03 +0000
(13:57 -0700)
util/file_types.py
patch
|
blob
|
history
diff --git
a/util/file_types.py
b/util/file_types.py
index 85e058db089cc03ef111b52aa73883f542756543..14d198bd6483f7619cef678f932dd0c965ff8625 100644
(file)
--- 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 = []