mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 07:06:13 +01:00
Simplify ArchQuery.read a bit
No functional changes - just to improve readability.
This commit is contained in:
parent
e580769757
commit
562374f045
@ -30,9 +30,8 @@ class ArchQuery(packagequery.PackageQuery, packagequery.PackageQueryResult):
|
||||
for line in pipe.readlines():
|
||||
line = line.rstrip().split(b' = ', 2)
|
||||
if len(line) == 2:
|
||||
if not line[0] in self.fields:
|
||||
self.fields[line[0].decode('ascii')] = []
|
||||
self.fields[line[0].decode('ascii')].append(line[1])
|
||||
field, value = line[0].decode('ascii'), line[1]
|
||||
self.fields.setdefault(field, []).append(value)
|
||||
if self_provides:
|
||||
prv = b'%s = %s' % (self.name(), self.fields['pkgver'][0])
|
||||
self.fields.setdefault('provides', []).append(prv)
|
||||
|
Loading…
Reference in New Issue
Block a user