diff options
author | kongr45gpen <electrovesta@gmail.com> | 2014-05-12 16:36:31 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2014-05-12 16:36:31 +0300 |
commit | 64715b9450b5ddfc38c093662862efdd4a0f83a4 (patch) | |
tree | 0fceeb1b2cdb307adc8e181ded6c52aa5fff82b6 /local | |
parent | b1cd15824f55246f8614b7615f23d5e8d65e745c (diff) | |
download | supybot_github-64715b9450b5ddfc38c093662862efdd4a0f83a4.tar.gz supybot_github-64715b9450b5ddfc38c093662862efdd4a0f83a4.tar.bz2 supybot_github-64715b9450b5ddfc38c093662862efdd4a0f83a4.zip |
Make sure that "fixed" gets coloured
Reduce repetitions in utility.colorAction()
Diffstat (limited to 'local')
-rw-r--r-- | local/utility.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/local/utility.py b/local/utility.py index dbdb69a..35b3a50 100644 --- a/local/utility.py +++ b/local/utility.py @@ -50,18 +50,16 @@ def maxLen(msg, maxn=400): def colorAction(action): """Give an action string (e.g. created, edited) and get a nice IRC colouring""" - if action == "created" or action == "opened" or action == "tagged" or \ - action == "success" or action == "passed": + if action in [ "created", "opened", "tagged", "success", "passed", "fixed" ]: return ircutils.bold(ircutils.mircColor(action, "green")) - if action == "deleted" or action == "closed" or action == "re-tagged" or \ - action == "deleted tag" or action == "failed" or action == "errored" or \ - action == "failure" or action == "still failing": + if action in [ "deleted" ,"closed", "re-tagged", "deleted tag", + "failed", "errored", "failure", "still failing" ]: return ircutils.bold(ircutils.mircColor(action, "red")) - if action == "merged": + if action in [ "merged" ]: return ircutils.bold(ircutils.mircColor(action, "light blue")) - if action == "reopened" or action == "pending": + if action in [ "reopened", "pending" ]: return ircutils.bold(ircutils.mircColor(action, "blue")) - if action == "forced the creation of" or action == "forced the deletion of": + if action in [ "forced the creation of", "forced the deletion of" ]: return ircutils.bold(ircutils.mircColor(action,"brown")) return action |