Made revision accept a .py at the end of the filenames.

This commit is contained in:
Jeremy Fincher 2004-01-14 15:50:45 +00:00
parent d18d6b63c7
commit eee9b5aaf2
2 changed files with 3 additions and 0 deletions

View File

@ -214,6 +214,8 @@ class Misc(callbacks.Privmsg):
""" """
name = privmsgs.getArgs(args, required=0, optional=1) name = privmsgs.getArgs(args, required=0, optional=1)
if name: if name:
if name.endswith('.py'):
name = name[:-3]
try: try:
modules = {} modules = {}
for moduleName in sys.modules: for moduleName in sys.modules:

View File

@ -183,6 +183,7 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
def testRevision(self): def testRevision(self):
self.assertNotError('revision Misc') self.assertNotError('revision Misc')
self.assertNotError('revision Misc.py')
self.assertNotError('revision') self.assertNotError('revision')
def testRevisionIsCaseInsensitive(self): def testRevisionIsCaseInsensitive(self):