Merge branch 'testing' of github.com:slackhead/Limnoria into testing

This commit is contained in:
Dave Woodfall 2014-04-05 07:21:33 +00:00
commit c17c21b5ac
4 changed files with 25 additions and 6 deletions

View File

@ -239,7 +239,19 @@ class Config(callbacks.Plugin):
s = group.help()
if s:
if hasattr(group, 'value') and not group._private:
s += _(' (Current value: %s)') % group
channel = msg.args[0]
if irc.isChannel(channel) and \
channel in group._children:
globvalue = str(group)
chanvalue = str(group.get(channel))
if chanvalue != globvalue:
s += _(' (Current global value: %s; '
'current channel value: %s)') % \
(globvalue, chanvalue)
else:
s += _(' (Current value: %s)') % group
else:
s += _(' (Current value: %s)') % group
irc.reply(s)
else:
irc.reply(_('That configuration group exists, but seems to '

View File

@ -301,6 +301,10 @@ repositories = {
'GLolol',
'SupyPlugins',
),
'Iota': GithubRepository(
'IotaSpencer',
'supyplugins',
),
}
class PluginDownloader(callbacks.Plugin):

View File

@ -361,15 +361,15 @@ class Favicon(SupyHTTPServerCallback):
file_path = conf.supybot.servers.http.favicon()
found = False
if file_path:
response = None
try:
icon = open(file_path, 'r')
found = True
icon = open(file_path, 'rb')
response = icon.read()
except IOError:
pass
finally:
icon.close()
if found:
response = icon.read()
if response is not None:
filename = file_path.rsplit(os.sep, 1)[1]
if '.' in filename:
ext = filename.rsplit('.', 1)[1]

View File

@ -209,7 +209,10 @@ class ValidLogLevel(registry.String):
def set(self, s):
s = s.upper()
try:
level = logging._levelNames[s]
try:
level = logging._levelNames[s]
except AttributeError:
level = logging._nameToLevel[s]
except KeyError:
try:
level = int(s)