mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Merge branch 'testing'
This commit is contained in:
commit
83aca7c651
@ -39,7 +39,7 @@ msgstr "\"|\" avec rien ne le suivant. Je ne peux évidtemment pas faire un pipe
|
||||
|
||||
#: callbacks.py:515
|
||||
msgid "%s is not a valid %s."
|
||||
msgstr "%s n'est pas un %s valide."
|
||||
msgstr "%s n'est pas du type '%s'."
|
||||
|
||||
#: callbacks.py:517
|
||||
msgid "That's not a valid %s."
|
||||
|
@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Supybot-fr\n"
|
||||
"POT-Creation-Date: 2010-10-16 12:34+CEST\n"
|
||||
"POT-Creation-Date: 2010-12-12 15:02+CET\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Valentin Lorentz <progval@gmail.com>\n"
|
||||
"Language-Team: Supybot-fr <progval@gmail.com>\n"
|
||||
@ -13,6 +13,14 @@ msgstr ""
|
||||
"X-Poedit-Country: France\n"
|
||||
"X-Poedit-SourceCharset: ASCII\n"
|
||||
|
||||
#: plugin.py:103
|
||||
msgid "configuration variable"
|
||||
msgstr "variable de configuration"
|
||||
|
||||
#: plugin.py:109
|
||||
msgid "settable configuration variable"
|
||||
msgstr "variable de configuration modifiable"
|
||||
|
||||
#: plugin.py:136
|
||||
msgid ""
|
||||
"<group>\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2010-10-16 12:34+CEST\n"
|
||||
"POT-Creation-Date: 2010-12-12 15:02+CET\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -15,6 +15,14 @@ msgstr ""
|
||||
"Generated-By: pygettext.py 1.5\n"
|
||||
|
||||
|
||||
#: plugin.py:103
|
||||
msgid "configuration variable"
|
||||
msgstr ""
|
||||
|
||||
#: plugin.py:109
|
||||
msgid "settable configuration variable"
|
||||
msgstr ""
|
||||
|
||||
#: plugin.py:136
|
||||
#, docstring
|
||||
msgid ""
|
||||
|
@ -100,13 +100,13 @@ def getConfigVar(irc, msg, args, state):
|
||||
state.args.append(group)
|
||||
del args[0]
|
||||
except registry.InvalidRegistryName, e:
|
||||
state.errorInvalid('configuration variable', str(e))
|
||||
state.errorInvalid(_('configuration variable'), str(e))
|
||||
addConverter('configVar', getConfigVar)
|
||||
|
||||
def getSettableConfigVar(irc, msg, args, state):
|
||||
getConfigVar(irc, msg, args, state)
|
||||
if not hasattr(state.args[-1], 'set'):
|
||||
state.errorInvalid('settable configuration variable',
|
||||
state.errorInvalid(_('settable configuration variable'),
|
||||
state.args[-1]._name)
|
||||
addConverter('settableConfigVar', getSettableConfigVar)
|
||||
|
||||
|
@ -34,7 +34,7 @@ import dynamicScope
|
||||
|
||||
import supybot.utils as utils
|
||||
|
||||
__builtins__['format'] = utils.str.format
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['format'] = utils.str.format
|
||||
|
||||
class Author(object):
|
||||
def __init__(self, name=None, nick=None, email=None, **kwargs):
|
||||
|
@ -37,6 +37,12 @@ from __future__ import division
|
||||
import time
|
||||
import select
|
||||
import socket
|
||||
try:
|
||||
import ssl
|
||||
SSLError = ssl.SSLError
|
||||
except:
|
||||
class SSLError(Exception):
|
||||
pass
|
||||
|
||||
import supybot.log as log
|
||||
import supybot.conf as conf
|
||||
@ -61,10 +67,11 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
self.writeCheckTime = None
|
||||
self.nextReconnectTime = None
|
||||
self.resetDelay()
|
||||
# Only connect to non-SSL servers
|
||||
if self.networkGroup.get('ssl').value:
|
||||
if self.networkGroup.get('ssl').value and not globals().has_key('ssl'):
|
||||
drivers.log.error('The Socket driver can not connect to SSL '
|
||||
'servers. Try the Twisted driver instead.')
|
||||
'servers for your Python version. Try the '
|
||||
'Twisted driver instead, or install a Python'
|
||||
'version that supports SSL (2.6 and greater).')
|
||||
else:
|
||||
self.connect()
|
||||
|
||||
@ -139,6 +146,12 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
self.irc.feedMsg(msg)
|
||||
except socket.timeout:
|
||||
pass
|
||||
except SSLError, e:
|
||||
if e.args[0] == 'The read operation timed out':
|
||||
pass
|
||||
else:
|
||||
self._handleSocketError(e)
|
||||
return
|
||||
except socket.error, e:
|
||||
self._handleSocketError(e)
|
||||
return
|
||||
@ -175,6 +188,9 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
try:
|
||||
self.conn.connect(server)
|
||||
self.conn.settimeout(conf.supybot.drivers.poll())
|
||||
if getattr(conf.supybot.networks, self.irc.network).ssl():
|
||||
assert globals().has_key('ssl')
|
||||
self.conn = ssl.wrap_socket(self.conn)
|
||||
self.connected = True
|
||||
self.resetDelay()
|
||||
except socket.error, e:
|
||||
|
@ -47,6 +47,6 @@ class DynamicScope(object):
|
||||
def __setattr__(self, name, value):
|
||||
self._getLocals(name)[name] = value
|
||||
|
||||
__builtins__['dynamic'] = DynamicScope()
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['dynamic'] = DynamicScope()
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||
|
@ -54,14 +54,14 @@ def force(x):
|
||||
return x()
|
||||
else:
|
||||
return x
|
||||
__builtins__['force'] = force
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['force'] = force
|
||||
|
||||
if sys.version_info < (2, 4, 0):
|
||||
def reversed(L):
|
||||
"""Iterates through a sequence in reverse."""
|
||||
for i in xrange(len(L) - 1, -1, -1):
|
||||
yield L[i]
|
||||
__builtins__['reversed'] = reversed
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['reversed'] = reversed
|
||||
|
||||
def sorted(iterable, cmp=None, key=None, reversed=False):
|
||||
L = list(iterable)
|
||||
@ -74,7 +74,7 @@ if sys.version_info < (2, 4, 0):
|
||||
L.reverse()
|
||||
return L
|
||||
|
||||
__builtins__['sorted'] = sorted
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['sorted'] = sorted
|
||||
|
||||
import operator
|
||||
def itemgetter(i):
|
||||
@ -86,8 +86,8 @@ if sys.version_info < (2, 4, 0):
|
||||
operator.attrgetter = attrgetter
|
||||
|
||||
import sets
|
||||
__builtins__['set'] = sets.Set
|
||||
__builtins__['frozenset'] = sets.ImmutableSet
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['set'] = sets.Set
|
||||
(__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__)['frozenset'] = sets.ImmutableSet
|
||||
|
||||
import socket
|
||||
# Some socket modules don't have sslerror, so we'll just make it an error.
|
||||
|
Loading…
Reference in New Issue
Block a user