mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-26 04:51:08 -05:00
accountsdb: fix missing import
This commit is contained in:
parent
ef35e34ad5
commit
02b9dafae5
@ -1,4 +1,4 @@
|
|||||||
# Autogenerated by update-modules.py on Sat Mar 9 11:14:30 2019 - DO NOT EDIT THIS COPY DIRECTLY!
|
# Autogenerated by update-modules.py on Sat Mar 9 12:35:58 2019 - DO NOT EDIT THIS COPY DIRECTLY!
|
||||||
###
|
###
|
||||||
# Copyright (c) 2019, James Lu <james@overdrivenetworks.com>
|
# Copyright (c) 2019, James Lu <james@overdrivenetworks.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -33,6 +33,7 @@ accountsdb: Provides storage for user-specific data via Supybot accounts, ident@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
|
import os
|
||||||
|
|
||||||
from supybot import ircdb, log, conf, registry
|
from supybot import ircdb, log, conf, registry
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ class AccountsDB():
|
|||||||
pickle.dump(self.db, f, 2)
|
pickle.dump(self.db, f, 2)
|
||||||
os.rename(tmp_filename, self.filename)
|
os.rename(tmp_filename, self.filename)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warning('%s: Unable to write database: %s', self._plugin_name, e)
|
log.exception('%s: Unable to write database: %s', self._plugin_name, e)
|
||||||
|
|
||||||
def _get_key(self, prefix):
|
def _get_key(self, prefix):
|
||||||
nick, identhost = prefix.split('!', 1)
|
nick, identhost = prefix.split('!', 1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Autogenerated by update-modules.py on Sat Mar 9 11:14:30 2019 - DO NOT EDIT THIS COPY DIRECTLY!
|
# Autogenerated by update-modules.py on Sat Mar 9 12:35:58 2019 - DO NOT EDIT THIS COPY DIRECTLY!
|
||||||
###
|
###
|
||||||
# Copyright (c) 2019, James Lu <james@overdrivenetworks.com>
|
# Copyright (c) 2019, James Lu <james@overdrivenetworks.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -33,6 +33,7 @@ accountsdb: Provides storage for user-specific data via Supybot accounts, ident@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
|
import os
|
||||||
|
|
||||||
from supybot import ircdb, log, conf, registry
|
from supybot import ircdb, log, conf, registry
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ class AccountsDB():
|
|||||||
pickle.dump(self.db, f, 2)
|
pickle.dump(self.db, f, 2)
|
||||||
os.rename(tmp_filename, self.filename)
|
os.rename(tmp_filename, self.filename)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warning('%s: Unable to write database: %s', self._plugin_name, e)
|
log.exception('%s: Unable to write database: %s', self._plugin_name, e)
|
||||||
|
|
||||||
def _get_key(self, prefix):
|
def _get_key(self, prefix):
|
||||||
nick, identhost = prefix.split('!', 1)
|
nick, identhost = prefix.split('!', 1)
|
||||||
|
@ -32,6 +32,7 @@ accountsdb: Provides storage for user-specific data via Supybot accounts, ident@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
|
import os
|
||||||
|
|
||||||
from supybot import ircdb, log, conf, registry
|
from supybot import ircdb, log, conf, registry
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ class AccountsDB():
|
|||||||
pickle.dump(self.db, f, 2)
|
pickle.dump(self.db, f, 2)
|
||||||
os.rename(tmp_filename, self.filename)
|
os.rename(tmp_filename, self.filename)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warning('%s: Unable to write database: %s', self._plugin_name, e)
|
log.exception('%s: Unable to write database: %s', self._plugin_name, e)
|
||||||
|
|
||||||
def _get_key(self, prefix):
|
def _get_key(self, prefix):
|
||||||
nick, identhost = prefix.split('!', 1)
|
nick, identhost = prefix.split('!', 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user