mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Remove botocore dependency from credstash script (#22511)
* Remove botocore dependency from credstash script * Update requirements_all.txt * Update pylintrc * Update credstash.py
This commit is contained in:
parent
8874422e8a
commit
821a90fa54
@ -4,7 +4,7 @@ import getpass
|
|||||||
|
|
||||||
from homeassistant.util.yaml import _SECRET_NAMESPACE
|
from homeassistant.util.yaml import _SECRET_NAMESPACE
|
||||||
|
|
||||||
REQUIREMENTS = ['credstash==1.15.0', 'botocore==1.7.34']
|
REQUIREMENTS = ['credstash==1.15.0']
|
||||||
|
|
||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
@ -24,16 +24,15 @@ def run(args):
|
|||||||
'value', help="The value to save when putting a secret",
|
'value', help="The value to save when putting a secret",
|
||||||
nargs='?', default=None)
|
nargs='?', default=None)
|
||||||
|
|
||||||
# pylint: disable=import-error, no-member
|
# pylint: disable=no-member
|
||||||
import credstash
|
import credstash
|
||||||
import botocore
|
|
||||||
|
|
||||||
args = parser.parse_args(args)
|
args = parser.parse_args(args)
|
||||||
table = _SECRET_NAMESPACE
|
table = _SECRET_NAMESPACE
|
||||||
|
|
||||||
try:
|
try:
|
||||||
credstash.listSecrets(table=table)
|
credstash.listSecrets(table=table)
|
||||||
except botocore.errorfactory.ClientError:
|
except Exception: # pylint: disable=broad-except
|
||||||
credstash.createDdbTable(table=table)
|
credstash.createDdbTable(table=table)
|
||||||
|
|
||||||
if args.action == 'list':
|
if args.action == 'list':
|
||||||
|
1
pylintrc
1
pylintrc
@ -42,7 +42,6 @@ reports=no
|
|||||||
[TYPECHECK]
|
[TYPECHECK]
|
||||||
# For attrs
|
# For attrs
|
||||||
ignored-classes=_CountingAttr
|
ignored-classes=_CountingAttr
|
||||||
generated-members=botocore.errorfactory
|
|
||||||
|
|
||||||
[FORMAT]
|
[FORMAT]
|
||||||
expected-line-ending-format=LF
|
expected-line-ending-format=LF
|
||||||
|
@ -235,9 +235,6 @@ blockchain==1.4.4
|
|||||||
# homeassistant.components.aws_sqs.notify
|
# homeassistant.components.aws_sqs.notify
|
||||||
boto3==1.9.16
|
boto3==1.9.16
|
||||||
|
|
||||||
# homeassistant.scripts.credstash
|
|
||||||
botocore==1.7.34
|
|
||||||
|
|
||||||
# homeassistant.components.braviatv.media_player
|
# homeassistant.components.braviatv.media_player
|
||||||
braviarc-homeassistant==0.3.7.dev0
|
braviarc-homeassistant==0.3.7.dev0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user