Philipp Hörist pushed to branch master at gajim / python-nbxmpp

Commits:

4 changed files:

Changes:

  • nbxmpp/auth.py
    ... ... @@ -46,7 +46,7 @@ class SASL:
    46 46
         """
    
    47 47
         Implements SASL authentication.
    
    48 48
         """
    
    49
    -    def __init__(self, client, log_context):
    
    49
    +    def __init__(self, client):
    
    50 50
             self._client = client
    
    51 51
     
    
    52 52
             self._password = None
    
    ... ... @@ -56,7 +56,7 @@ class SASL:
    56 56
             self._method = None
    
    57 57
             self._error = None
    
    58 58
     
    
    59
    -        self._log = LogAdapter(log, {'context': log_context})
    
    59
    +        self._log = LogAdapter(log, {'context': client.log_context})
    
    60 60
     
    
    61 61
         @property
    
    62 62
         def error(self):
    

  • nbxmpp/client.py
    ... ... @@ -117,13 +117,13 @@ class Client(Observable):
    117 117
     
    
    118 118
             self._ping_source_id = None
    
    119 119
     
    
    120
    -        self._dispatcher = StanzaDispatcher(self, self._log_context)
    
    120
    +        self._dispatcher = StanzaDispatcher(self)
    
    121 121
             self._dispatcher.subscribe('before-dispatch', self._on_before_dispatch)
    
    122 122
             self._dispatcher.subscribe('parsing-error', self._on_parsing_error)
    
    123 123
             self._dispatcher.subscribe('stream-end', self._on_stream_end)
    
    124 124
     
    
    125
    -        self._smacks = Smacks(self, self._log_context)
    
    126
    -        self._sasl = SASL(self, self._log_context)
    
    125
    +        self._smacks = Smacks(self)
    
    126
    +        self._sasl = SASL(self)
    
    127 127
     
    
    128 128
             self._state = StreamState.DISCONNECTED
    
    129 129
     
    

  • nbxmpp/dispatcher.py
    ... ... @@ -101,14 +101,14 @@ class StanzaDispatcher(Observable):
    101 101
     
    
    102 102
         """
    
    103 103
     
    
    104
    -    def __init__(self, client, log_context):
    
    104
    +    def __init__(self, client):
    
    105 105
             Observable.__init__(self, log)
    
    106 106
             self._client = client
    
    107 107
             self._modules = {}
    
    108 108
             self._parser = None
    
    109 109
             self._websocket_stream_error = None
    
    110 110
     
    
    111
    -        self._log = LogAdapter(log, {'context': log_context})
    
    111
    +        self._log = LogAdapter(log, {'context': client.log_context})
    
    112 112
     
    
    113 113
             self._handlers = {}
    
    114 114
     
    

  • nbxmpp/smacks.py
    ... ... @@ -37,7 +37,7 @@ class Smacks:
    37 37
         number of handled stanzas
    
    38 38
         """
    
    39 39
     
    
    40
    -    def __init__(self, client, log_context):
    
    40
    +    def __init__(self, client):
    
    41 41
             self._client = client
    
    42 42
             self._out_h = 0  # Outgoing stanzas handled
    
    43 43
             self._in_h = 0  # Incoming stanzas handled
    
    ... ... @@ -59,7 +59,7 @@ class Smacks:
    59 59
             self._session_id = None
    
    60 60
             self._location = None
    
    61 61
     
    
    62
    -        self._log = LogAdapter(log, {'context': log_context})
    
    62
    +        self._log = LogAdapter(log, {'context': client.log_context})
    
    63 63
     
    
    64 64
             self.register_handlers()
    
    65 65