split() on all whitespace removing the need for strip()

This commit is contained in:
Brian Stinson 2014-06-17 20:51:53 -05:00
parent 8f2a1accaa
commit 7974593b12

View file

@ -116,7 +116,7 @@ class Commands(pyrpkg.Commands):
# This strip / split is kind a ugly, but checksums shouldn't have # This strip / split is kind a ugly, but checksums shouldn't have
# two spaces in them. sources file might need more structure in the # two spaces in them. sources file might need more structure in the
# future # future
csum, file = map(str.strip, archive.strip().split(' ', 1)) csum, file = archive.strip().split(None, 1)
except ValueError: except ValueError:
raise pyrpkg.rpkgError('Malformed sources file.') raise pyrpkg.rpkgError('Malformed sources file.')
# See if we already have a valid copy downloaded # See if we already have a valid copy downloaded