Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Print error when dict found and string expected.
Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
  • Loading branch information
Marko Saukko committed Nov 26, 2012
1 parent ec6ad29 commit 97574b4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions repomd-pattern-builder.py
Expand Up @@ -97,14 +97,10 @@ def process_yaml(stream, version, release, proot, newobsapi):

for p in collect:
if type(p).__name__=='dict':
a = p.values()[0]
if a == arch:
entry = etree.SubElement(req, "{%s}entry" %rpm_ns)
entry.set("name", p.keys()[0])
entry.set("arch", arch)
else:
entry = etree.SubElement(req, "{%s}entry" %rpm_ns)
entry.set("name", p)
print "ERROR: Found dict and expected string value. '%s'" % (p)
sys.exit(1)
entry = etree.SubElement(req, "{%s}entry" %rpm_ns)
entry.set("name", p)

return count

Expand Down

0 comments on commit 97574b4

Please sign in to comment.