mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Merge branch 'testing' of github.com:slackhead/Limnoria into testing
This commit is contained in:
commit
c17c21b5ac
@ -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 '
|
||||
|
@ -301,6 +301,10 @@ repositories = {
|
||||
'GLolol',
|
||||
'SupyPlugins',
|
||||
),
|
||||
'Iota': GithubRepository(
|
||||
'IotaSpencer',
|
||||
'supyplugins',
|
||||
),
|
||||
}
|
||||
|
||||
class PluginDownloader(callbacks.Plugin):
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user