summaryrefslogtreecommitdiffstats
path: root/bin/tracker_data.py
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2017-01-06 20:26:15 +0000
committerChris Lamb <lamby@debian.org>2017-01-06 20:26:15 +0000
commit6ccbd816f11a379e521ae7de45bc0cf1b0bb8720 (patch)
treed8c69a4c6b56e9560c27817d0c431d576c751990 /bin/tracker_data.py
parenta910ec7ffcbe73281266c4dfcb942afb6e09c98e (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.py6
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:

© 2014-2024 Faster IT GmbH | imprint | privacy policy