Release b6a37b5ebade9bbfaf8d4b1ce203f822
This commit is contained in:
parent
cd508340e3
commit
8a8522d26b
11
__init__.py
11
__init__.py
@ -36,8 +36,11 @@ import sys
|
||||
import time
|
||||
|
||||
|
||||
logger_name = 'SOCKET_PROTOCOL'
|
||||
logger = logging.getLogger(logger_name)
|
||||
try:
|
||||
from config import APP_NAME as ROOT_LOGGER_NAME
|
||||
except ImportError:
|
||||
ROOT_LOGGER_NAME = 'root'
|
||||
logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
||||
|
||||
|
||||
__DESCRIPTION__ = """The Module {\\tt %s} is designed to pack and unpack data for serial transportation.
|
||||
@ -75,10 +78,10 @@ class callback_storage(dict):
|
||||
return self[None][None]
|
||||
except KeyError:
|
||||
pass # nothing to append
|
||||
return None
|
||||
return (None, None, None)
|
||||
|
||||
def add(self, service_id, data_id, callback, *args, **kwargs):
|
||||
if self.get(service_id, data_id) is not None:
|
||||
if self.get(service_id, data_id) != (None, None, None):
|
||||
raise RegistrationError("Callback for service_id (%s) and data_id (%s) already exists" % (repr(service_id), repr(data_id)))
|
||||
if service_id not in self:
|
||||
self[service_id] = {}
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user