aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/info.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/info.py b/modules/info.py
index 8b9ad9e6..db23d068 100644
--- a/modules/info.py
+++ b/modules/info.py
@@ -4,11 +4,12 @@ from src import IRCBot, ModuleManager, utils
class Module(ModuleManager.BaseModule):
@utils.hook("received.command.version")
def version(self, event):
- commit_hash = utils.git_commit(self.bot.directory)
+ commit = utils.git_commit(self.bot.directory)
out = "Version: BitBot %s" % IRCBot.VERSION
- if not commit_hash == None:
- out = "%s (%s@%s)" % (out, branch, commit_hash)
+ if not commit == None:
+ branch, commit = commit
+ out = "%s (%s@%s)" % (out, branch or "", commit)
event["stdout"].write(out)
@utils.hook("received.command.source")