Skip to content

Commit 4973257

Browse files
committed
fix bug in code and variable names
1 parent b1032f5 commit 4973257

4 files changed

Lines changed: 138 additions & 129 deletions

File tree

‎Article.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ import polling2
535535

536536
try:
537537
print(f'Downloading File from {file_url} ...')
538-
response = polling2.poll(lambda: requests.get(file_url, verify= False),
538+
bulkFile_response = polling2.poll(lambda: requests.get(file_url, verify= False),
539539
step = 10,
540540
poll_forever = True,
541541
check_success= lambda r: r.status_code == 200)
@@ -559,14 +559,14 @@ The actual file name has been replace a ```_``` (underscore) with ```%3A``` esca
559559
```python
560560
# Save the file locally.
561561

562-
if response.status_code == 200: # HTTP Status 'OK'
562+
if bulkFile_response.status_code == 200: # HTTP Status 'OK'
563563
zipfilename = file_url.split("?")[0].split("/")[-1].replace("%3A","_")
564564
print('Download File Successfully')
565-
open(zipfilename, 'wb').write(response.content)
565+
open(zipfilename, 'wb').write(bulkFile_response.content)
566566
print(f'{zipfilename} Saved')
567567
else:
568-
print(f'RDP APIs: Request file failure: {response.status_code} {response.reason}')
569-
print(f'Text: {response.text}')
568+
print(f'RDP APIs: Request file failure: {bulkFile_response.status_code} {bulkFile_response.reason}')
569+
print(f'Text: {bulkFile_response.text}')
570570
```
571571

572572
Result:

0 commit comments

Comments
 (0)