Fix usage of logger constants in command system

The definition of various constants was refactored to use enumerations
in commit 2fbadc91e9. One reference in the command system was not
changed to use the new enum, however.
This commit is contained in:
Markus Böhme 2017-03-07 15:57:50 +01:00
parent c02260c4d1
commit 432ec7ff7d
1 changed files with 2 additions and 6 deletions

View File

@ -24,7 +24,7 @@ import dialogs
from common import gajim
from common import helpers
from common.exceptions import GajimGeneralException
from common.logger import Constants
from common.logger import KindConstant
from ..errors import CommandError
from ..framework import CommandContainer, command, doc
@ -32,10 +32,6 @@ from ..mapping import generate_usage
from .hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
# This holds constants fron the logger, which we'll be using in some of our
# commands.
lc = Constants()
class StandardCommonCommands(CommandContainer):
"""
This command container contains standard commands which are common
@ -107,7 +103,7 @@ class StandardCommonCommands(CommandContainer):
contact, time, kind, show, message, subject = row
if not contact:
if kind == lc.KIND_CHAT_MSG_SENT:
if kind == KindConstant.CHAT_MSG_SENT:
contact = gajim.nicks[self.account]
else:
contact = self.contact.name