diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-06 17:25:50 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-06 17:25:50 +0300 |
commit | f374d4fda8db1862311355c1b189f2d1e94f15de (patch) | |
tree | ab76cb4ab8cda66ec9e89d8b66d9c8765c73298d /scripts/master_daemon.py | |
parent | 198a5ae7358d139a935163d739e0343fc899538b (diff) |
increase server<->client API version from 1.2 to 1.3
various fixes
Diffstat (limited to 'scripts/master_daemon.py')
-rwxr-xr-x | scripts/master_daemon.py | 10 |
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'} |