Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

borg assimilate robustness #52

Merged
merged 2 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 9, 2012
  1. @ricardokirkner

    make borg robust

    ricardokirkner authored
  2. @ricardokirkner
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 7 deletions.
  1. +13 −7 bots/borg.py
View
20 bots/borg.py
@@ -18,13 +18,19 @@ def get_bots_by_name():
head, tail = os.path.split(sfile)
if myfile == tail:
continue
- module = __import__(os.path.splitext(tail)[0])
- for name, value in inspect.getmembers(module):
- if name == "ClientBase":
- continue
- elif getattr(value, 'name', None) is not None and \
- inspect.isclass(value) and not issubclass(value, BorgClient):
- bots[value.name] = value()
+ try:
+ module = __import__(os.path.splitext(tail)[0])
+ for name, value in inspect.getmembers(module):
+ if name == "ClientBase":
+ continue
+ elif getattr(value, 'name', None) is not None and \
+ inspect.isclass(value) and not issubclass(value, BorgClient):
+ try:
+ bots[value.name] = value()
+ except:
+ pass
+ except:
+ pass
return bots
Something went wrong with that request. Please try again.