mmueller / supybot-git

A Git plugin for Supybot (a Python IRC bot)
45 stars 24 forks source link

[Broken Feature] log command doesn't work #9

Closed samrg472 closed 11 years ago

samrg472 commented 11 years ago

I have just recently updated the plugin. But now I have an issue.

ERROR 2012-11-17T23:33:18 Uncaught exception in ['log']. Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/supybot/callbacks.py", line 1180, in _callCommand self.callCommand(command, irc, msg, _args, _kwargs) File "/usr/local/lib/python2.6/dist-packages/supybot/utils/python.py", line 86, in g f(self, _args, _kwargs) File "/usr/local/lib/python2.6/dist-packages/supybot/callbacks.py", line 1166, in callCommand method(irc, msg, _args, *_kwargs) TypeError: 'NoneType' object is not callable

The command I used was: log 1 where is a configured repo (I tried multiple repos none worked) I got this in IRC: An error has occurred and has been logged. Please contact this bot's administrator for more information.

samrg472 commented 11 years ago

supybot.directories.log, supybot.log, supybot.log.format, supybot.log.level, supybot.log.timestampFormat, supybot.log.stdout, supybot.log.stdout.colorized, supybot.log.stdout.wrap, supybot.log.stdout.format, supybot.log.stdout.level, supybot.log.plugins, supybot.log.plugins.individualLogfiles, and supybot.log.plugins.format

This is what happens when I use search. I think log is a part of the default system maybe? I looked for log in every possible list for all loaded plugins and couldn't find it. But "git log" works perfectly fine.

mmueller commented 11 years ago

Thanks @samrg472. I did some voodoo to get log working, since supybot does indeed have a variable called "log" that collides with it. Can you tell me which version of supybot you're using so I can reproduce?

mmueller commented 11 years ago

Ok, I've reproduced it. I'll have a fix soon.

mmueller commented 11 years ago

Hey @samgr472, thanks for the report. This turns out to be a bug in Supybot, not this plugin. I reproduced it running Supybot 0.83.4.1 without the Git plugin even loaded. Calling @log raises this exception anyway.

The workaround is to set Git as the primary handler of the log command:

@defaultplugin log Git

This will send the commands to the Git plugin instead of having the Owner plugin catch them and cause problems. I added a note to the README to this effect.

Note that this version of Supybot is 3.5 years old, it might be a good idea to upgrade to the latest git version. This bug does not occur for me with the git version.

samrg472 commented 11 years ago

I had no idea that the version is that old. I simply downloaded it from sourceforge which is that version. Thanks for solving my issue though.