mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-09 20:45:47 +01:00
escape spaces in username
This commit is contained in:
parent
1623924f2b
commit
8548d163f6
@ -299,7 +299,9 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
elif cmd == 'id':
|
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':
|
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):
|
def get_user_id(user):
|
||||||
u = makeurl(['person', user])
|
u = makeurl(['person', user.replace(' ', '+')])
|
||||||
f = urllib2.urlopen(u)
|
try:
|
||||||
return f.readlines()
|
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):
|
def get_source_file(prj, package, filename, targetfilename=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user