diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2016-08-08 15:02:05 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2016-08-08 15:02:05 -0500 |
commit | 5d48c108a3a3b1bbdc4821d7463f331331d941f2 (patch) | |
tree | 9c845414608ded54b19956f3feda676167e0982f /lib/spack | |
parent | 3ea13256205524c0a40612b712536ebea626472c (diff) | |
download | spack-5d48c108a3a3b1bbdc4821d7463f331331d941f2.tar.gz spack-5d48c108a3a3b1bbdc4821d7463f331331d941f2.tar.bz2 spack-5d48c108a3a3b1bbdc4821d7463f331331d941f2.tar.xz spack-5d48c108a3a3b1bbdc4821d7463f331331d941f2.zip |
Only strip newline chars, not spaces
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/llnl/util/filesystem.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 2478f5c159..4cf99163e0 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -93,7 +93,7 @@ def filter_file(regex, repl, *filenames, **kwargs): try: for line in fileinput.input(filename, inplace=True): - print(re.sub(regex, repl, line.rstrip())) + print(re.sub(regex, repl, line.rstrip('\n'))) except: # clean up the original file on failure. shutil.move(backup_filename, filename) |