Remove import-froms for tenacity.
This commit is contained in:
parent
132342e4f6
commit
1626bc85d8
1 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from tenacity import retry, wait_exponential, retry_if_exception_type
|
import tenacity
|
||||||
|
|
||||||
from . import crypto
|
from . import crypto
|
||||||
from . import errors
|
from . import errors
|
||||||
|
@ -43,9 +43,9 @@ class Mega:
|
||||||
options = {}
|
options = {}
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
@retry(
|
@tenacity.retry(
|
||||||
retry=retry_if_exception_type(errors.EAGAIN),
|
retry=tenacity.retry_if_exception_type(errors.EAGAIN),
|
||||||
wait=wait_exponential(multiplier=2, min=2, max=60)
|
wait=tenacity.wait_exponential(multiplier=2, min=2, max=60)
|
||||||
)
|
)
|
||||||
def _api_request(self, data, params={}):
|
def _api_request(self, data, params={}):
|
||||||
req_params = {'id': self.sequence_num}
|
req_params = {'id': self.sequence_num}
|
||||||
|
|
Loading…
Reference in a new issue