]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
Add option to sendprofile to only dump the data.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Nov 2010 21:34:32 +0000 (22:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Nov 2010 21:34:32 +0000 (22:34 +0100)
sendprofile

index 0ad067103f999d0a61a5ca8e25b437e6db82f7a2..8bc2c1c8c28bcc9a4a047bad20708bb820bdf3f5 100644 (file)
@@ -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: