From 8e8fb9bfd476fddeb20aeaa0bfbe5c210f397dc4 Mon Sep 17 00:00:00 2001 From: Glenn Barrett Date: Fri, 13 Feb 2015 23:25:53 -0500 Subject: [PATCH] Update threatstream-api.py Fix typo and key error when running without args --- threatstream-api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/threatstream-api.py b/threatstream-api.py index 5556b53..d7d3718 100644 --- a/threatstream-api.py +++ b/threatstream-api.py @@ -1,4 +1,4 @@ -# threatstreap-api.py +# threatstream-api.py # # Copyright (C) 2014 THREAT STREAM, Inc. # This file is subject to the terms and conditions of the GNU General Public @@ -15,7 +15,7 @@ apikey = 'TS_APIKey' # Or Specify on the commandline query_api_url = 'https://api.threatstream.com/api/v2' -#log.basicConfig(format='%(message)s', level=log.INFO) +log.basicConfig(format='%(message)s', level=log.INFO) def query_api(apiuser,apikey,resource,flags): @@ -56,7 +56,7 @@ def format_output(jsonblob): if __name__ == '__main__': if len(argv) < 2: - log.info('Usage: {} [query] {username} {apikey}'.format(__file__)) + log.info('Usage: {} [query] [username] [apikey]'.format(__file__)) exit(0) if len(argv) == 4: apiuser = argv[2]