mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 10:36:17 +01:00
escape spaces in username
This commit is contained in:
parent
1623924f2b
commit
8548d163f6
@ -299,7 +299,9 @@ def main():
|
||||
|
||||
|
||||
elif cmd == 'id':
|
||||
print ''.join(get_user_id(sys.argv[2]))
|
||||
r = get_user_id(sys.argv[2])
|
||||
if r:
|
||||
print ''.join(r)
|
||||
|
||||
|
||||
elif cmd == 'platforms':
|
||||
|
10
osc/core.py
10
osc/core.py
@ -682,9 +682,13 @@ def read_meta_from_spec(specfile):
|
||||
|
||||
|
||||
def get_user_id(user):
|
||||
u = makeurl(['person', user])
|
||||
f = urllib2.urlopen(u)
|
||||
return f.readlines()
|
||||
u = makeurl(['person', user.replace(' ', '+')])
|
||||
try:
|
||||
f = urllib2.urlopen(u)
|
||||
return ''.join(f.readlines())
|
||||
except urllib2.HTTPError:
|
||||
print 'user \'%s\' not found' % user
|
||||
return None
|
||||
|
||||
|
||||
def get_source_file(prj, package, filename, targetfilename=None):
|
||||
|
Loading…
Reference in New Issue
Block a user