diff options
author | becker33 <becker33@llnl.gov> | 2016-08-08 13:28:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-08 13:28:56 -0700 |
commit | 2b94d7cf8eb97e7dd08ea26da0d3481dd36927d5 (patch) | |
tree | 9c845414608ded54b19956f3feda676167e0982f /lib | |
parent | 3ea13256205524c0a40612b712536ebea626472c (diff) | |
parent | 5d48c108a3a3b1bbdc4821d7463f331331d941f2 (diff) | |
download | spack-2b94d7cf8eb97e7dd08ea26da0d3481dd36927d5.tar.gz spack-2b94d7cf8eb97e7dd08ea26da0d3481dd36927d5.tar.bz2 spack-2b94d7cf8eb97e7dd08ea26da0d3481dd36927d5.tar.xz spack-2b94d7cf8eb97e7dd08ea26da0d3481dd36927d5.zip |
Merge pull request #1472 from adamjstewart/fixes/rstrip
Only strip newline chars, not spaces
Diffstat (limited to 'lib')
-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) |