瀏覽代碼

Release b6a37b5eba

master
Dirk Alders 4 年之前
父節點
當前提交
8a8522d26b
共有 3 個檔案被更改,包括 8295 行新增8232 行删除
  1. 7
    4
      __init__.py
  2. 8288
    8228
      _testresults_/unittest.json
  3. 二進制
      _testresults_/unittest.pdf

+ 7
- 4
__init__.py 查看文件

@@ -36,8 +36,11 @@ import sys
36 36
 import time
37 37
 
38 38
 
39
-logger_name = 'SOCKET_PROTOCOL'
40
-logger = logging.getLogger(logger_name)
39
+try:
40
+    from config import APP_NAME as ROOT_LOGGER_NAME
41
+except ImportError:
42
+    ROOT_LOGGER_NAME = 'root'
43
+logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
41 44
 
42 45
 
43 46
 __DESCRIPTION__ = """The Module {\\tt %s} is designed to pack and unpack data for serial transportation.
@@ -75,10 +78,10 @@ class callback_storage(dict):
75 78
             return self[None][None]
76 79
         except KeyError:
77 80
             pass  # nothing to append
78
-        return None
81
+        return (None, None, None)
79 82
 
80 83
     def add(self, service_id, data_id, callback, *args, **kwargs):
81
-        if self.get(service_id, data_id) is not None:
84
+        if self.get(service_id, data_id) != (None, None, None):
82 85
             raise RegistrationError("Callback for service_id (%s) and data_id (%s) already exists" % (repr(service_id), repr(data_id)))
83 86
         if service_id not in self:
84 87
             self[service_id] = {}

+ 8288
- 8228
_testresults_/unittest.json
文件差異過大導致無法顯示
查看文件


二進制
_testresults_/unittest.pdf 查看文件


Loading…
取消
儲存