Browse Source

bug-fix devicelist method

tags/v1.0.0
Dirk Alders 2 years ago
parent
commit
2f65ff360d
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      function/__init__.py

+ 3
- 1
function/__init__.py View File

56
         if self.__devices__ is None:
56
         if self.__devices__ is None:
57
             self.__devices__ = []
57
             self.__devices__ = []
58
             for name, obj in inspect.getmembers(self):
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
                     for devicename, device in inspect.getmembers(obj):
62
                     for devicename, device in inspect.getmembers(obj):
61
                         if device.__class__.__module__ == "devices":
63
                         if device.__class__.__module__ == "devices":
62
                             self.__devices__.append(device)
64
                             self.__devices__.append(device)

Loading…
Cancel
Save