forked from LibreSchool/doraemon
use '[\s,;]+' as package separator
This commit is contained in:
parent
078373258c
commit
a5df37424b
@ -112,8 +112,8 @@ class MyApp:
|
|||||||
db = Popen(['/sbin/e-smith/db', 'roles', 'getjson'], stdout=PIPE).communicate()[0]
|
db = Popen(['/sbin/e-smith/db', 'roles', 'getjson'], stdout=PIPE).communicate()[0]
|
||||||
for data in json.loads(db):
|
for data in json.loads(db):
|
||||||
if data['name'] == role:
|
if data['name'] == role:
|
||||||
retval['addpkg'] = data['props']['Addpkg'].split()
|
retval['addpkg'] = re.split(r'[\s,;]+', data['props']['Addpkg'])
|
||||||
retval['delpkg'] = data['props']['Delpkg'].split()
|
retval['delpkg'] = re.split(r'[\s,;]+', data['props']['Delpkg'])
|
||||||
continue
|
continue
|
||||||
except: pass
|
except: pass
|
||||||
return retval
|
return retval
|
||||||
|
Loading…
x
Reference in New Issue
Block a user