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() s = group.help()
if s: if s:
if hasattr(group, 'value') and not group._private: 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) irc.reply(s)
else: else:
irc.reply(_('That configuration group exists, but seems to ' irc.reply(_('That configuration group exists, but seems to '

View File

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

View File

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

View File

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