зеркало из https://github.com/microsoft/mwt-ds.git
AzureStorageDownloader.py: Try importing azure.storage and install if necessary
This commit is contained in:
Родитель
dd45471953
Коммит
6333f7ba77
|
@ -1,6 +1,14 @@
|
|||
from azure.storage.blob import BlockBlobService
|
||||
import pickle, os, time, sys, datetime, requests, argparse
|
||||
import configparser
|
||||
try:
|
||||
from azure.storage.blob import BlockBlobService
|
||||
except ImportError as e:
|
||||
print('ImportError: {}'.format(e))
|
||||
if input("azure.storage.blob is required. Do you want to install it [Y/n]? ") != 'Y':
|
||||
sys.exit()
|
||||
import pip
|
||||
pip.main(['install', 'azure.storage.blob'])
|
||||
|
||||
|
||||
LogDownloaderURL = "https://cps-staging-exp-experimentation.azurewebsites.net/api/Log?account={ACCOUNT_NAME}&key={ACCOUNT_KEY}&start={START_DATE}&end={END_DATE}&container={CONTAINER}"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче