瀏覽代碼

bug-fix devicelist method

tags/v1.0.0
Dirk Alders 2 年之前
父節點
當前提交
2f65ff360d
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      function/__init__.py

+ 3
- 1
function/__init__.py 查看文件

@@ -56,7 +56,9 @@ class all_functions(object):
56 56
         if self.__devices__ is None:
57 57
             self.__devices__ = []
58 58
             for name, obj in inspect.getmembers(self):
59
-                if obj.__class__.__module__.split('.')[0] == 'function':
59
+                if obj.__class__.__module__ == "devices":
60
+                    self.__devices__.append(obj)
61
+                elif obj.__class__.__module__.split('.')[0] == 'function':
60 62
                     for devicename, device in inspect.getmembers(obj):
61 63
                         if device.__class__.__module__ == "devices":
62 64
                             self.__devices__.append(device)

Loading…
取消
儲存