fix clear command
This commit is contained in:
parent
268f6e23b4
commit
044e1539e9
1 changed files with 5 additions and 1 deletions
|
@ -110,12 +110,16 @@ class MuMgr(object):
|
||||||
if 'port' in user and row['port'] != user['port']:
|
if 'port' in user and row['port'] != user['port']:
|
||||||
match = False
|
match = False
|
||||||
if match:
|
if match:
|
||||||
print("clear user %s" % self.userinfo(row['user']))
|
|
||||||
row.update(up)
|
row.update(up)
|
||||||
|
print("clear user [%s]" % row['user'])
|
||||||
self.data.save(self.config_path)
|
self.data.save(self.config_path)
|
||||||
|
|
||||||
def list_user(self, user):
|
def list_user(self, user):
|
||||||
self.data.load(self.config_path)
|
self.data.load(self.config_path)
|
||||||
|
if not user:
|
||||||
|
for row in self.data.json:
|
||||||
|
print("user [%s] port %s" % (row['user'], row['port']))
|
||||||
|
return
|
||||||
for row in self.data.json:
|
for row in self.data.json:
|
||||||
match = True
|
match = True
|
||||||
if 'user' in user and row['user'] != user['user']:
|
if 'user' in user and row['user'] != user['user']:
|
||||||
|
|
Loading…
Add table
Reference in a new issue