Fix typos, thanks codespell
!
This commit is contained in:
parent
f252be9b6d
commit
20e88fda50
@ -61,7 +61,7 @@ def _intercept(method, name, public):
|
||||
except InvocationException:
|
||||
raise
|
||||
except Exception as e:
|
||||
raise InvocationException("A problem occured calling %s.%s!" % (instance.FQN(), method.__name__), e)
|
||||
raise InvocationException("A problem occurred calling %s.%s!" % (instance.FQN(), method.__name__), e)
|
||||
_resolver._rpc = public
|
||||
_resolver._rpc_name = method.__name__ if name is None else name
|
||||
return _resolver
|
||||
@ -696,7 +696,7 @@ class RemoteSession(object):
|
||||
e = {
|
||||
'item-not-found': RemoteException("No remote handler available for %s at %s!" % (pmethod, iq['from'])),
|
||||
'forbidden': AuthorizationException("Forbidden to invoke remote handler for %s at %s!" % (pmethod, iq['from'])),
|
||||
'undefined-condition': RemoteException("An unexpected problem occured trying to invoke %s at %s!" % (pmethod, iq['from'])),
|
||||
'undefined-condition': RemoteException("An unexpected problem occurred trying to invoke %s at %s!" % (pmethod, iq['from'])),
|
||||
}[condition]
|
||||
if e is None:
|
||||
RemoteException("An unexpected exception occurred at %s!" % iq['from'])
|
||||
|
@ -257,7 +257,7 @@ class StaticDisco(object):
|
||||
|
||||
def add_identity(self, jid, node, ifrom, data):
|
||||
"""
|
||||
Add a new identity to te JID/node combination.
|
||||
Add a new identity to the JID/node combination.
|
||||
|
||||
The data parameter may provide:
|
||||
category -- The general category to which the agent belongs.
|
||||
|
@ -611,7 +611,7 @@ class XEP_0050(BasePlugin):
|
||||
def terminate_command(self, session):
|
||||
"""
|
||||
Delete a command's session after a command has completed
|
||||
or an error has occured.
|
||||
or an error has occurred.
|
||||
|
||||
Arguments:
|
||||
session -- All stored data relevant to the current
|
||||
|
@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
|
||||
class ResultIterator:
|
||||
|
||||
"""
|
||||
An iterator for Result Set Managment
|
||||
An iterator for Result Set Management
|
||||
"""
|
||||
|
||||
def __init__(self, query, interface, results='substanzas', amount=10,
|
||||
|
@ -13,7 +13,7 @@ from slixmpp.plugins.xep_0030.stanza.items import DiscoItems
|
||||
class Set(ElementBase):
|
||||
|
||||
"""
|
||||
XEP-0059 (Result Set Managment) can be used to manage the
|
||||
XEP-0059 (Result Set Management) can be used to manage the
|
||||
results of queries. For example, limiting the number of items
|
||||
per response or starting at certain positions.
|
||||
|
||||
|
@ -82,9 +82,9 @@ class Item(ElementBase):
|
||||
self.xml.append(value)
|
||||
|
||||
def get_payload(self):
|
||||
childs = list(self.xml)
|
||||
if len(childs) > 0:
|
||||
return childs[0]
|
||||
children = list(self.xml)
|
||||
if len(children) > 0:
|
||||
return children[0]
|
||||
|
||||
def del_payload(self):
|
||||
for child in self.xml:
|
||||
|
@ -31,9 +31,9 @@ class EventItem(ElementBase):
|
||||
self.xml.append(value)
|
||||
|
||||
def get_payload(self):
|
||||
childs = list(self.xml)
|
||||
if len(childs) > 0:
|
||||
return childs[0]
|
||||
children = list(self.xml)
|
||||
if len(children) > 0:
|
||||
return children[0]
|
||||
|
||||
def del_payload(self):
|
||||
for child in self.xml:
|
||||
|
@ -233,7 +233,7 @@ class XEP_0065(BasePlugin):
|
||||
sock.close()
|
||||
except socket.error:
|
||||
pass
|
||||
# Though this should not be neccessary remove the closed session anyway
|
||||
# Though this should not be necessary remove the closed session anyway
|
||||
if sid in self._sessions:
|
||||
log.warn(('SOCKS5 session with sid = "%s" was not ' +
|
||||
'removed from _sessions by sock.close()') % sid)
|
||||
|
@ -110,7 +110,7 @@ class XEP_0199(BasePlugin):
|
||||
try:
|
||||
rtt = yield from self.ping(self.xmpp.boundjid.host, timeout=self.timeout)
|
||||
except IqTimeout:
|
||||
log.debug("Did not recieve ping back in time." + \
|
||||
log.debug("Did not receive ping back in time." + \
|
||||
"Requesting Reconnect.")
|
||||
self.xmpp.reconnect()
|
||||
else:
|
||||
|
@ -25,7 +25,7 @@ class XEP_0300(BasePlugin):
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'block_size': 1024 * 1024, # One MiB
|
||||
'prefered': 'sha-256',
|
||||
'preferded': 'sha-256',
|
||||
'enable_sha-1': False,
|
||||
'enable_sha-256': True,
|
||||
'enable_sha-512': True,
|
||||
@ -73,7 +73,7 @@ class XEP_0300(BasePlugin):
|
||||
|
||||
def compute_hash(self, filename, function=None):
|
||||
if function is None:
|
||||
function = self.prefered
|
||||
function = self.preferred
|
||||
h = self._hashlib_function[function]()
|
||||
with open(filename, 'rb') as f:
|
||||
while True:
|
||||
|
@ -399,7 +399,7 @@ class XEP_0325(BasePlugin):
|
||||
"""
|
||||
|
||||
if not session in self.sessions:
|
||||
# This can happend if a session was deleted, like in a timeout. Just drop the data.
|
||||
# This can happen if a session was deleted, like in a timeout. Just drop the data.
|
||||
return
|
||||
|
||||
if result == "error":
|
||||
@ -457,7 +457,7 @@ class XEP_0325(BasePlugin):
|
||||
Arguments:
|
||||
from_jid -- The jid of the requester
|
||||
to_jid -- The jid of the device(s)
|
||||
callback -- The callback function to call when data is availble.
|
||||
callback -- The callback function to call when data is available.
|
||||
|
||||
The callback function must support the following arguments:
|
||||
|
||||
|
@ -40,7 +40,7 @@ class Roster(ElementBase):
|
||||
|
||||
def get_ver(self):
|
||||
"""
|
||||
Ensure handling an empty ver attribute propery.
|
||||
Ensure handling an empty ver attribute property.
|
||||
|
||||
The ver attribute is special in that the presence of the
|
||||
attribute with an empty value is important for boostrapping
|
||||
@ -50,7 +50,7 @@ class Roster(ElementBase):
|
||||
|
||||
def set_ver(self, ver):
|
||||
"""
|
||||
Ensure handling an empty ver attribute propery.
|
||||
Ensure handling an empty ver attribute property.
|
||||
|
||||
The ver attribute is special in that the presence of the
|
||||
attribute with an empty value is important for boostrapping
|
||||
|
@ -75,7 +75,7 @@ class MatchXMLMask(MatcherBase):
|
||||
Defaults to ``"__no_ns__"``.
|
||||
"""
|
||||
if source is None:
|
||||
# If the element was not found. May happend during recursive calls.
|
||||
# If the element was not found. May happen during recursive calls.
|
||||
return False
|
||||
|
||||
# Convert the mask to an XML object if it is a string.
|
||||
|
@ -229,7 +229,7 @@ def get_AAAA(host, resolver=None, use_aiodns=True, loop=None):
|
||||
type=socket.SOCK_STREAM)
|
||||
return [rec[4][0] for rec in recs]
|
||||
except (OSError, socket.gaierror):
|
||||
log.debug("DNS: Error retreiving AAAA address " + \
|
||||
log.debug("DNS: Error retrieving AAAA address " + \
|
||||
"info for %s." % host)
|
||||
return []
|
||||
|
||||
|
@ -436,7 +436,7 @@ class XMLStream(asyncio.BaseProtocol):
|
||||
|
||||
def cancel_connection_attempt(self):
|
||||
"""
|
||||
Immediatly cancel the current create_connection() Future.
|
||||
Immediately cancel the current create_connection() Future.
|
||||
This is useful when a client using slixmpp tries to connect
|
||||
on flaky networks, where sometimes a connection just gets lost
|
||||
and it needs to reconnect while the attempt is still ongoing.
|
||||
@ -449,7 +449,7 @@ class XMLStream(asyncio.BaseProtocol):
|
||||
"""Close the XML stream and wait for an acknowldgement from the server for
|
||||
at most `wait` seconds. After the given number of seconds has
|
||||
passed without a response from the serveur, or when the server
|
||||
successfuly responds with a closure of its own stream, abort() is
|
||||
successfully responds with a closure of its own stream, abort() is
|
||||
called. If wait is 0.0, this is almost equivalent to calling abort()
|
||||
directly.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user