summaryrefslogtreecommitdiffstats
path: root/scripts/master_daemon.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-07-06 17:25:50 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-07-06 17:25:50 +0300
commitf374d4fda8db1862311355c1b189f2d1e94f15de (patch)
treeab76cb4ab8cda66ec9e89d8b66d9c8765c73298d /scripts/master_daemon.py
parent198a5ae7358d139a935163d739e0343fc899538b (diff)
increase server<->client API version from 1.2 to 1.3
various fixes
Diffstat (limited to 'scripts/master_daemon.py')
-rwxr-xr-xscripts/master_daemon.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/master_daemon.py b/scripts/master_daemon.py
index a44f55a8..3a9d7ffe 100755
--- a/scripts/master_daemon.py
+++ b/scripts/master_daemon.py
@@ -221,9 +221,13 @@ if args.action != 'show':
raise Exception('%s does not have function %s' % (daemon.name, args.action))
try:
func()
- except Exception as e:
- print(termstyle.red(e))
- sys.exit(1)
+ except:
+ try: # give it another try
+ sleep(1)
+ func()
+ except Exception as e:
+ print(termstyle.red(e))
+ sys.exit(1)
passive = {'start': 'started', 'restart': 'restarted', 'stop': 'stopped', 'show': 'running'}