Merge pull request #2313 from archtaku/develop

Tolerate trailing whitespace in package metadata
This commit is contained in:
Thomas S Hatch 2012-10-22 10:47:13 -07:00
commit cb272e94c0

View File

@ -36,12 +36,12 @@ def _parse_pkg_meta(path):
if result['retcode'] == 0:
for line in result['stdout'].split('\n'):
if not name:
m = re.match('^Name\s*:\s*(.+)$',line)
m = re.match('^Name\s*:\s*(.+)\s*$',line)
if m:
name = m.group(1)
continue
if not version:
m = re.match('^Version\s*:\s*(.+)$',line)
m = re.match('^Version\s*:\s*(.+)\s*$',line)
if m:
version = m.group(1)
continue