Skip to content

Commit

Permalink
Merge pull request #81 from matt---4/patch-1
Browse files Browse the repository at this point in the history
Update session.py - handling offline / broken devices.
  • Loading branch information
KJonline authored Jan 7, 2025
2 parents b3ee963 + 8e30ac0 commit ed1cc95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyhiveapi/apyhiveapi/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ async def createDevices(self):
continue
product_list = PRODUCTS.get(self.data.products[aProduct]["type"], [])
for code in product_list:
eval("self." + code)
try:
eval("self." + code)
except:

Check failure on line 541 in pyhiveapi/apyhiveapi/session.py

View workflow job for this annotation

GitHub Actions / Check flake8

E722 do not use bare 'except'
pass

if self.data.products[aProduct]["type"] in hive_type:
self.config.mode.append(p["id"])
Expand Down

0 comments on commit ed1cc95

Please sign in to comment.