Permalink
Browse files

Merge pull request #52 from ricardokirkner/master

borg assimilate robustness
  • Loading branch information...
2 parents 577f905 + 55db179 commit 1e2be83257070cac37c2ff4e0e027fbb8777edd5 @luciotorre committed Jul 9, 2012
Showing with 13 additions and 7 deletions.
  1. +13 −7 bots/borg.py
View
@@ -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

0 comments on commit 1e2be83

Please sign in to comment.