Rename log() to add_log() to avoid name conflict
This commit is contained in:
parent
540be5ff02
commit
9f1ec44786
@ -52,7 +52,7 @@ class LexiconModel():
|
||||
def __repr__(self):
|
||||
return '<LexiconModel lid={0.id} name={0.name}>'.format(self)
|
||||
|
||||
def log(self, message):
|
||||
def add_log(self, message):
|
||||
now = int(time.time())
|
||||
with json_rw(self.config_path) as j:
|
||||
j['log'].append([now, message])
|
||||
|
@ -60,7 +60,7 @@ def create_lexicon(name, editor):
|
||||
|
||||
# Load the Lexicon and log creation
|
||||
l = LexiconModel(lid)
|
||||
l.log("Lexicon created")
|
||||
l.add_log("Lexicon created")
|
||||
|
||||
logger.info("Created Lexicon {0.name}, ed. {1.displayname} ({0.id})".format(
|
||||
l, editor))
|
||||
@ -170,7 +170,7 @@ def add_player(lex, player):
|
||||
|
||||
# Log to the lexicon's log
|
||||
if added:
|
||||
lex.log("Player '{0.username}' joined ({0.id})".format(player))
|
||||
lex.add_log("Player '{0.username}' joined ({0.id})".format(player))
|
||||
|
||||
|
||||
def remove_player(lex, player):
|
||||
@ -232,7 +232,7 @@ def add_character(lex, player, charinfo={}):
|
||||
|
||||
# Log addition
|
||||
if added:
|
||||
lex.log("Character '{0.name}' created ({0.cid})".format(character))
|
||||
lex.add_log("Character '{0.name}' created ({0.cid})".format(character))
|
||||
|
||||
def delete_character(lex, charname):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user