Permalink
Browse files

make it slightly more robust even

  • Loading branch information...
1 parent 9122f1c commit 55db179988b5b3e62ce0a1dbfbcad6a736507df5 @ricardokirkner ricardokirkner committed Jul 9, 2012
Showing with 13 additions and 10 deletions.
  1. +13 −10 bots/borg.py
View
@@ -18,16 +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):
- try:
- bots[value.name] = value()
- except:
- pass
+ 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 55db179

Please sign in to comment.