From: Dave Reisner Date: Mon, 27 Feb 2012 13:14:58 +0000 (-0500) Subject: systemd-analyze: call os.uname() once X-Git-Tag: v44~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a84f9b3c1db1afa8a69698a323425d67f1b9e45b;p=systemd systemd-analyze: call os.uname() once Uses a format string, which is dependent on python 2.6. --- diff --git a/src/systemd-analyze b/src/systemd-analyze index dad2ab8d..8148bfb8 100755 --- a/src/systemd-analyze +++ b/src/systemd-analyze @@ -172,7 +172,7 @@ elif sys.argv[1] == 'plot': osrel = osrel.strip('\"\n') break - banner = "%s %s (%s %s) %s" % (osrel, os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4]) + banner = "{} {} ({} {}) {}".format(osrel, *(os.uname()[1:5])) draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1) for x in range(0, finish_time/10000 + 100, 100):