Fix typos, thanks codespell!

This commit is contained in:
Emmanuel Gil Peyrot
2018-01-10 02:18:07 +01:00
parent f252be9b6d
commit 20e88fda50
15 changed files with 24 additions and 24 deletions

View File

@@ -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'])

View File

@@ -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.

View File

@@ -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

View File

@@ -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,

View File

@@ -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.

View File

@@ -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:

View File

@@ -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:

View File

@@ -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)

View File

@@ -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:

View File

@@ -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:

View File

@@ -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: