Merge branch 'testing' of github.com:ProgVal/Limnoria into testing

This commit is contained in:
Valentin Lorentz 2013-02-01 14:54:39 +00:00
commit e45bce65e5
2 changed files with 4 additions and 2 deletions

View File

@ -292,8 +292,8 @@ class Tokenizer(object):
def _handleToken(self, token): def _handleToken(self, token):
if token[0] == token[-1] and token[0] in self.quotes: if token[0] == token[-1] and token[0] in self.quotes:
token = token[1:-1] token = token[1:-1]
# FIXME: No need to tell you this is a hack. # FIXME: No need to tell you this is a hack.
# It has to handle both IRC commands and serialized configuration. # It has to handle both IRC commands and serialized configuration.
# #
# Whoever you are, if you make a single modification to this # Whoever you are, if you make a single modification to this
# code, TEST the code with Python 2 & 3, both with the unit # code, TEST the code with Python 2 & 3, both with the unit

View File

@ -196,9 +196,11 @@ class IrcMsg(object):
return (self.__class__, (str(self),)) return (self.__class__, (str(self),))
def tag(self, tag, value=True): def tag(self, tag, value=True):
"""Affect a key:value pair to this message."""
self.tags[tag] = value self.tags[tag] = value
def tagged(self, tag): def tagged(self, tag):
"""Get the value affected to a tag."""
return self.tags.get(tag) # Returns None if it's not there. return self.tags.get(tag) # Returns None if it's not there.
def __getattr__(self, attr): def __getattr__(self, attr):