Conditions | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python |
||
11 | def write_status_watchdog(watchdog_path, timeout): |
||
12 | timeout = int(timeout) |
||
13 | |||
14 | try: |
||
15 | watchdog = open(watchdog_path, "w+") |
||
16 | except: |
||
17 | logger.warning("while action write_status_watchdog - error opening watchdog file") |
||
18 | return False |
||
19 | |||
20 | try: |
||
21 | watchdog.write('\n') |
||
22 | watchdog.flush() |
||
23 | finally: |
||
24 | watchdog.close() |
||
25 | |||
26 | return True |
||
27 | |||
41 | pass |