From: Michael Tremer Date: Tue, 30 Nov 2010 21:34:32 +0000 (+0100) Subject: Add option to sendprofile to only dump the data. X-Git-Tag: v0.4~3 X-Git-Url: http://git.ipfire.org/?p=oddments%2Ffireinfo.git;a=commitdiff_plain;h=679065509c4d5c73e2cfc45fe28791362a991dd6 Add option to sendprofile to only dump the data. --- diff --git a/sendprofile b/sendprofile index 0ad0671..8bc2c1c 100644 --- a/sendprofile +++ b/sendprofile @@ -49,6 +49,12 @@ def main(): # Collect system information system = fireinfo.System() + + # If --dump is passed -> only dump the output. + if "--dump" in sys.argv: + print json.dumps(system.profile(), sort_keys=True, indent=4) + return 0 + try: send_profile(system.profile()) except urllib2.URLError: