mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-03 16:14:10 +01:00
supybot-wizard: Fix crash when adding or removing owner capability.
Closes GH-1410.
This commit is contained in:
parent
fa76fb9cd4
commit
71cf7338c3
@ -634,14 +634,14 @@ def main():
|
|||||||
if yn('Do you want to remove its owner capability?',
|
if yn('Do you want to remove its owner capability?',
|
||||||
default=False):
|
default=False):
|
||||||
u.removeCapability('owner')
|
u.removeCapability('owner')
|
||||||
ircdb.users.setUser(id, u)
|
ircdb.users.setUser(u)
|
||||||
else:
|
else:
|
||||||
output("""That user already exists, but doesn't have owner
|
output("""That user already exists, but doesn't have owner
|
||||||
capabilities.""")
|
capabilities.""")
|
||||||
if yn('Do you want to add to it owner capabilities?',
|
if yn('Do you want to add to it owner capabilities?',
|
||||||
default=False):
|
default=False):
|
||||||
u.addCapability('owner')
|
u.addCapability('owner')
|
||||||
ircdb.users.setUser(id, u)
|
ircdb.users.setUser(u)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
password = getpass('What should the owner\'s password be?')
|
password = getpass('What should the owner\'s password be?')
|
||||||
u = ircdb.users.newUser()
|
u = ircdb.users.newUser()
|
||||||
|
Loading…
Reference in New Issue
Block a user