mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 16:22:55 +00:00
Don't choke on multiple spaces in metadata files
There are some package metadata files with one space separating the hash and the source filename and some are separated by more than one space. Mapping str.strip() across the resulting list will remove any errant spaces left over.
This commit is contained in:
parent
f3349a9df7
commit
cfdeed2808
2 changed files with 2 additions and 2 deletions
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name = "centpkg",
|
||||
version = "0.0.1",
|
||||
version = "0.0.2",
|
||||
author = "Brian Stinson",
|
||||
author_email = "bstinson@ksu.edu",
|
||||
description = "CentOS Plugin to rpkg for managing RPM package sources",
|
||||
|
|
|
@ -126,7 +126,7 @@ class Commands(pyrpkg.Commands):
|
|||
# This strip / split is kind a ugly, but checksums shouldn't have
|
||||
# two spaces in them. sources file might need more structure in the
|
||||
# future
|
||||
csum, file = archive.strip().split(' ', 1)
|
||||
csum, file = map(str.strip, archive.strip().split(' ', 1))
|
||||
except ValueError:
|
||||
raise pyrpkg.rpkgError('Malformed sources file.')
|
||||
# See if we already have a valid copy downloaded
|
||||
|
|
Loading…
Add table
Reference in a new issue