analyze: Cosmetic exit when the bootup is not yet complete when plotting.

This is just a nicer message than a python traceback.
This commit is contained in:
Colin Guthrie 2012-04-02 11:08:20 +01:00 committed by Lennart Poettering
parent 6008900425
commit 6070fe66ac

View File

@ -31,6 +31,10 @@ def acquire_start_time():
startup_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'StartupTimestampMonotonic'))
finish_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic'))
if finish_time == 0:
sys.stderr.write("Bootup is not yet finished. Please try again later.\n")
sys.exit(1)
assert initrd_time <= startup_time
assert startup_time <= finish_time