Show More
@@ -129,7 +129,7 b' class SysInfoRes(object):' | |||||
129 | class SysInfo(object): |
|
129 | class SysInfo(object): | |
130 |
|
130 | |||
131 | def __init__(self, func_name, **kwargs): |
|
131 | def __init__(self, func_name, **kwargs): | |
132 | self.func_name = func_name |
|
132 | self.function_name = func_name | |
133 | self.value = _NA |
|
133 | self.value = _NA | |
134 | self.state = None |
|
134 | self.state = None | |
135 | self.kwargs = kwargs or {} |
|
135 | self.kwargs = kwargs or {} | |
@@ -140,14 +140,14 b' class SysInfo(object):' | |||||
140 | raise ValueError( |
|
140 | raise ValueError( | |
141 | 'computed value for {} is not instance of ' |
|
141 | 'computed value for {} is not instance of ' | |
142 | '{}, got {} instead'.format( |
|
142 | '{}, got {} instead'.format( | |
143 | self.func_name, SysInfoRes, type(computed))) |
|
143 | self.function_name, SysInfoRes, type(computed))) | |
144 | return computed.__json__() |
|
144 | return computed.__json__() | |
145 |
|
145 | |||
146 | def __str__(self): |
|
146 | def __str__(self): | |
147 | return '<SysInfo({})>'.format(self.func_name) |
|
147 | return '<SysInfo({})>'.format(self.function_name) | |
148 |
|
148 | |||
149 | def compute(self, **kwargs): |
|
149 | def compute(self, **kwargs): | |
150 | return self.func_name(**kwargs) |
|
150 | return self.function_name(**kwargs) | |
151 |
|
151 | |||
152 |
|
152 | |||
153 | # SysInfo functions |
|
153 | # SysInfo functions |
General Comments 0
You need to be logged in to leave comments.
Login now