File: fetch.py

package info (click to toggle)
crmsh 5.0.0~rc2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,792 kB
  • sloc: python: 50,329; sh: 1,207; makefile: 254; xml: 243; exp: 234; awk: 22
file content (7 lines) | stat: -rwxr-xr-x 213 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
#!/usr/bin/python3
import crm_script
try:
    uptime = open('/proc/uptime').read().split()[0]
    crm_script.exit_ok(uptime)
except Exception as e:
    crm_script.exit_fail("Couldn't open /proc/uptime: %s" % (e))