File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ def collect(self):
172172 # set the next time it should run
173173 conf ['next_run' ] += conf ['interval' ]
174174
175- if 'hashrate' in self .collectors and now >= self .collectors ['hashrate' ]['next_run' ]:
175+ if mhs and 'hashrate' in self .collectors and now >= self .collectors ['hashrate' ]['next_run' ]:
176176 conf = self .collectors ['hashrate' ]
177177 self .queue .append ([self .worker , 'hashrate' , mhs , now ])
178178
@@ -227,7 +227,7 @@ def call_devs(self):
227227 mhs = [round (now ['Total MH' ] - last ['Total MH' ], 3 )
228228 for now , last in zip (data ['DEVS' ], self .last_devs )]
229229 else :
230- mhs = [d [ 'MHS 5s' ] for d in data ['DEVS' ]]
230+ mhs = [d . get ( 'MHS 5s' ) for d in data ['DEVS' ] if 'MHS 5s' in d ]
231231 self .last_devs = data ['DEVS' ]
232232 return mhs , temps , details
233233
You can’t perform that action at this time.
0 commit comments