mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Updated again.
This commit is contained in:
parent
92a7ae1028
commit
dce0378a8c
@ -18,6 +18,7 @@ class IrcUser:
|
||||
def __init__(self, **kwargs):
|
||||
self.__dict__.update(kwargs)
|
||||
|
||||
IrcChannel = IrcUser
|
||||
UserCapabilitySet = list
|
||||
CapabilitySet = list
|
||||
|
||||
@ -28,6 +29,7 @@ def write(fd, s):
|
||||
if __name__ == '__main__':
|
||||
shutil.copy(userFile, userFile + '.bak')
|
||||
shutil.copy(channelFile, channelFile + '.bak')
|
||||
try:
|
||||
# Users.conf.
|
||||
fd = file(userFile)
|
||||
s = fd.read().strip()
|
||||
@ -45,7 +47,7 @@ if __name__ == '__main__':
|
||||
for capability in u.capabilities:
|
||||
try:
|
||||
(channel, capability) = rsplit(capability, '.', 1)
|
||||
capability = ','.join(channel, capability)
|
||||
capability = ','.join([channel, capability])
|
||||
except ValueError:
|
||||
pass
|
||||
write(fd, ' capability %s' % capability)
|
||||
@ -70,4 +72,8 @@ if __name__ == '__main__':
|
||||
for ignore in c.ignores:
|
||||
write(fd, ' ignore %s' % ignore)
|
||||
write(fd, '')
|
||||
|
||||
except Exception, e:
|
||||
print 'Exception raised, restoring backups.'
|
||||
shutil.copy(userFile + '.bak', userFile)
|
||||
shutil.copy(channelFile + '.bak', channelFile)
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user