From dbafb29e4d1f76e018b3fcf85c5f2ec8c4938adf Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 10 Apr 2011 01:35:54 -0400 Subject: [PATCH] color kinda makes quotes redundant... --- actions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/actions.py b/actions.py index 51d0753..1096b52 100644 --- a/actions.py +++ b/actions.py @@ -52,7 +52,7 @@ def cmd_git(nick, host, chan, msg): # commands to interface with the bot's git r elif args[0] == "branch": # get our current branch branch = subprocess.check_output(['git', 'name-rev', '--name-only', 'HEAD'], stderr=subprocess.STDOUT) # git name-rev --name-only HEAD branch = branch[:-1] # strip newline - say(chan, "\x02%s\x0F: currently on branch '\x0302%s\x0301'." % (nick, branch)) + say(chan, "\x02%s\x0F: currently on branch \x0302%s\x0301." % (nick, branch)) elif args[0] == "branches": # get list of branches branches = subprocess.check_output(['git', 'branch'], stderr=subprocess.STDOUT) # git branch @@ -72,16 +72,16 @@ def cmd_git(nick, host, chan, msg): # commands to interface with the bot's git r try: result = subprocess.check_output(['git', 'checkout', branch], stderr=subprocess.STDOUT) # git checkout our_branch if "Already on" in result: - say(chan, "\x02%s\x0F: already on '\x0302%s\x0301'!" % (nick, branch)) + say(chan, "\x02%s\x0F: already on \x0302%s\x0301!" % (nick, branch)) else: - say(chan, "\x02%s\x0F: switched to branch '\x0302%s\x0301'." % (nick, branch)) + say(chan, "\x02%s\x0F: switched to branch \x0302%s\x0301." % (nick, branch)) except subprocess.CalledProcessError: # git couldn't switch branches - say(chan, "\x02%s\x0F: branch '\x0302%s\x0301' does not exist!" % (nick, branch)) + say(chan, "\x02%s\x0F: branch \x0302%s\x0301 does not exist!" % (nick, branch)) elif args[0] == "pull": # pull from remote repository branch = subprocess.check_output(['git', 'name-rev', '--name-only', 'HEAD'], stderr=subprocess.STDOUT) # git name-rev --name-only HEAD branch = branch[:-1] # strip newline - say(chan, "\x02%s\x0F: pulling from remote (currently on '\x0302%s\x0301')..." % (nick, branch)) + say(chan, "\x02%s\x0F: pulling from remote (currently on \x0302%s\x0301)..." % (nick, branch)) result = subprocess.check_output(['git', 'pull']) # pull from remote if "Already up-to-date." in result: say(chan, "\x02%s\x0F: done; no new changes." % nick) @@ -89,4 +89,4 @@ def cmd_git(nick, host, chan, msg): # commands to interface with the bot's git r say(chan, "\x02%s\x0F: done; new changes merged." % nick) else: - say(chan, "\x02%s\x0F: unknown argument: '\x0303%s\x0301'." % (nick, args[0])) + say(chan, "\x02%s\x0F: unknown argument: \x0303%s\x0301." % (nick, args[0]))