diff options
author | Chris Lamb <lamby@debian.org> | 2017-01-06 20:26:15 +0000 |
---|---|---|
committer | Chris Lamb <lamby@debian.org> | 2017-01-06 20:26:15 +0000 |
commit | 1f5222111ece18927ec4b99a811e2dec452e849b (patch) | |
tree | 60f4fb3a3cdf32acf443a353df867b45334ce269 /bin/tracker_data.py | |
parent | 5ddf774d4fab6a6a308dc7944efec230a177063a (diff) |
Always strip whitespace from EOL
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@47794 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/tracker_data.py')
-rw-r--r-- | bin/tracker_data.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/tracker_data.py b/bin/tracker_data.py index f25aff44c9..9f61d66abf 100644 --- a/bin/tracker_data.py +++ b/bin/tracker_data.py @@ -107,12 +107,14 @@ class TrackerData(object): @classmethod def parse_needed_file(self, inputfile): - PKG_RE = '^(\S+)(?:\s+\((.*)\)\s*)?$' - SEP_RE = '^--\s*$' + PKG_RE = '^(\S+)(?:\s+\((.*)\))?$' + SEP_RE = '^--$' state = 'LOOK_FOR_SEP' result = {} package = '' for line in inputfile: + # Always strip whitespace from end of line + line = line.rstrip() if state == 'LOOK_FOR_SEP': res = re.match(SEP_RE, line) if not res: |