Skip to content

Commit ab14ec2

Browse files
committed
updates
1 parent cda549f commit ab14ec2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

expansion/expansion.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2893,11 +2893,16 @@ def get_index_for_file_names(self, file_names, format='tsv'):
28932893
"Please provide one or a list of data file file_names: get_guid_for_filename\(file_names=file_name_list\)"
28942894
)
28952895
all_records = []
2896+
count,total=0,len(file_names)
28962897
for file_name in file_names:
2897-
print("\tGetting indexd record for {}".format(file_name))
2898+
count+=1
2899+
print("\t({}/{})Getting indexd record for {}".format(count,total,file_name))
28982900
index_url = "{}/index/index/?file_name={}".format(self._endpoint, file_name)
28992901
response = requests.get(index_url, auth=self._auth_provider).text
2900-
response = json.loads(response)
2902+
try:
2903+
response = json.loads(response)
2904+
except Exception as e:
2905+
print("Error: {}: {}".format(response,e))
29012906
if 'records' in response:
29022907
records = response['records']
29032908
if len(records) == 1:
@@ -3129,7 +3134,7 @@ def delete_uploaded_files(self, guids):
31293134
deleted,failed = [],[]
31303135
for guid in guids:
31313136
count+=1
3132-
fence_url = "{}user/data/".format(self._endpoint)
3137+
fence_url = "{}/user/data/".format(self._endpoint)
31333138

31343139
try:
31353140
response = requests.delete(fence_url + guid, auth=self._auth_provider)

0 commit comments

Comments
 (0)