commit: 685abf8bc45f4ad28fc7668c5464f114c0d9740d
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 01:40:35 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 01:40:35 2015 +0000
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=685abf8b
grs/Interpret.py: clean up white space padding on _line.
grs/Interpret.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grs/Interpret.py b/grs/Interpret.py
index d326d9c..4f184a0 100644
--- a/grs/Interpret.py
+++ b/grs/Interpret.py
@@ -166,6 +166,9 @@ class Interpret(Daemon):
line_number = 0
medium_type = None
for _line in _file.readlines():
+ # Get rid of whitespace padding immediately
+ _line = _line.strip()
+
# Increment the line number by one and create the name of the
# file for the progress stamp.
line_number += 1
@@ -173,7 +176,7 @@ class Interpret(Daemon):
# Do nothing for lines with initial # or blank lines. Create
# a progress stamp only if we are not doing an update run.
- if re.search(r'^(#).*$', _line) or _line.strip() == '' or
_line.strip() == '+':
+ if re.search(r'^(#).*$', _line) or _line == '' or _line == '+':
if not self.update_run:
stampit(progress)
continue