mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
- don't crash on invalid attribute names
This commit is contained in:
parent
09a7f60ede
commit
00286be354
@ -735,6 +735,8 @@ class Osc(cmdln.Cmdln):
|
||||
for i in opts.set.split(','):
|
||||
values += '<value>%s</value>' % i
|
||||
aname = opts.attribute.split(":")
|
||||
if len(aname) != 2:
|
||||
raise oscerr.WrongOptions('Given attribute is not in "NAMESPACE:NAME" style')
|
||||
d = '<attributes><attribute namespace=\'%s\' name=\'%s\' >%s</attribute></attributes>' % (aname[0], aname[1], values)
|
||||
url = makeurl(apiurl, attributepath)
|
||||
for data in streamfile(url, http_POST, data=d):
|
||||
|
Loading…
Reference in New Issue
Block a user