aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikraman Choudhury <vikraman.choudhury@gmail.com>2011-07-15 21:56:43 +0530
committerVikraman Choudhury <vikraman.choudhury@gmail.com>2011-07-15 21:56:43 +0530
commit2dc208e1b646c187c0034712d5f475b003fa75c2 (patch)
tree5ac7e1308e9a22ecb1a1f197b8ddfa22b790342f
parentmake db configurable (diff)
downloadgentoostats-2dc208e1b646c187c0034712d5f475b003fa75c2.tar.gz
gentoostats-2dc208e1b646c187c0034712d5f475b003fa75c2.tar.bz2
gentoostats-2dc208e1b646c187c0034712d5f475b003fa75c2.zip
make verbosity optional
-rwxr-xr-xclient/gentoostats-send5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/gentoostats-send b/client/gentoostats-send
index 7c39a7a..631a331 100755
--- a/client/gentoostats-send
+++ b/client/gentoostats-send
@@ -38,10 +38,13 @@ def main():
parser.add_argument('-u', '--url', default='/gentoostats')
parser.add_argument('-a', '--auth', default='/etc/gentoostats/auth.cfg')
parser.add_argument('-c', '--config', default='/etc/gentoostats/payload.cfg')
+ parser.add_argument('-v', '--verbose', action='store_true')
args = vars(parser.parse_args())
pl = Payload(configfile=args['config'])
- pl.dump(human=True)
+
+ if args['verbose']:
+ pl.dump(human=True)
post_data = pl.get()
post_data['AUTH'] = getAuthInfo(auth=args['auth'])