soft import warrant and boto3
Hard import broke build, now using soft import.
This commit is contained in:
parent
c26e983e2f
commit
efc2dbd3a5
@ -1,12 +1,18 @@
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..utils import ExtractorError
|
||||||
import boto3
|
|
||||||
from warrant import Cognito
|
|
||||||
from warrant.aws_srp import AWSSRP
|
|
||||||
|
|
||||||
class CognitoBaseIE(InfoExtractor):
|
class CognitoBaseIE(InfoExtractor):
|
||||||
|
|
||||||
|
|
||||||
def _cognito_login(self, auth_data):
|
def _cognito_login(self, auth_data):
|
||||||
|
|
||||||
|
try:
|
||||||
|
import boto3
|
||||||
|
from warrant import Cognito
|
||||||
|
from warrant.aws_srp import AWSSRP
|
||||||
|
except ImportError:
|
||||||
|
raise ExtractorError('%s depends on boto3 and warrant.' % self.IE_NAME)
|
||||||
|
|
||||||
region = auth_data['PoolId'].split('_')[0]
|
region = auth_data['PoolId'].split('_')[0]
|
||||||
client = boto3.client(
|
client = boto3.client(
|
||||||
'cognito-idp',
|
'cognito-idp',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user