From 04475dcb2075d5130f559776b9e7d3285fd2fbb6 Mon Sep 17 00:00:00 2001 From: carnal0wnage Date: Thu, 19 Apr 2018 18:16:32 -0400 Subject: [PATCH] updates --- libs/dynamodb.py | 2 +- libs/sql.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/dynamodb.py b/libs/dynamodb.py index 5ce0929..b787bee 100644 --- a/libs/dynamodb.py +++ b/libs/dynamodb.py @@ -63,7 +63,7 @@ def list_dynamodb_tables_detailed(): else: print("### {} DynamoDB Tables ###" .format(region)) for tables in response['TableNames']: - describe_table(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, tables, region) + describe_table(tables, region) print("\n") except botocore.exceptions.ClientError as e: diff --git a/libs/sql.py b/libs/sql.py index 479611c..9e34206 100644 --- a/libs/sql.py +++ b/libs/sql.py @@ -85,7 +85,7 @@ def insert_sub_service_data(db_name, records): def search_recon_by_key(db_name,AWSKeyID): with sqlite3.connect(db_name) as db: cursor = db.cursor() - cursor.execute("""SELECT service,sub_service,checked_at FROM recon WHERE AWSKeyID=? ORDER BY datetime(checked_at)""",(AWSKeyID,)) + cursor.execute("""SELECT DISTINCT service,sub_service,checked_at FROM recon WHERE AWSKeyID=? ORDER BY datetime(checked_at)""",(AWSKeyID,)) results = cursor.fetchall() return results