From 77f7a53d9ff1d96355648f042336165c7d9572a4 Mon Sep 17 00:00:00 2001 From: Jason Hu Date: Thu, 28 Mar 2019 14:37:44 -0700 Subject: [PATCH] Remove botocore dependency from credstash script (#22511) * Remove botocore dependency from credstash script * Update requirements_all.txt * Update pylintrc * Update credstash.py --- homeassistant/scripts/credstash.py | 7 +++---- pylintrc | 1 - requirements_all.txt | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/scripts/credstash.py b/homeassistant/scripts/credstash.py index 302910c5b08..6dd9f90197a 100644 --- a/homeassistant/scripts/credstash.py +++ b/homeassistant/scripts/credstash.py @@ -4,7 +4,7 @@ import getpass from homeassistant.util.yaml import _SECRET_NAMESPACE -REQUIREMENTS = ['credstash==1.15.0', 'botocore==1.7.34'] +REQUIREMENTS = ['credstash==1.15.0'] def run(args): @@ -24,16 +24,15 @@ def run(args): 'value', help="The value to save when putting a secret", nargs='?', default=None) - # pylint: disable=import-error, no-member + # pylint: disable=no-member import credstash - import botocore args = parser.parse_args(args) table = _SECRET_NAMESPACE try: credstash.listSecrets(table=table) - except botocore.errorfactory.ClientError: + except Exception: # pylint: disable=broad-except credstash.createDdbTable(table=table) if args.action == 'list': diff --git a/pylintrc b/pylintrc index a88aabe1936..7d349033f70 100644 --- a/pylintrc +++ b/pylintrc @@ -42,7 +42,6 @@ reports=no [TYPECHECK] # For attrs ignored-classes=_CountingAttr -generated-members=botocore.errorfactory [FORMAT] expected-line-ending-format=LF diff --git a/requirements_all.txt b/requirements_all.txt index 04c5f93ceb0..a43a04240ba 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -235,9 +235,6 @@ blockchain==1.4.4 # homeassistant.components.aws_sqs.notify boto3==1.9.16 -# homeassistant.scripts.credstash -botocore==1.7.34 - # homeassistant.components.braviatv.media_player braviarc-homeassistant==0.3.7.dev0