Skip to content

Commit

Permalink
Redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
jorhelp committed Dec 15, 2022
1 parent 8ae9757 commit 2f09a9a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Ingram/middleware/shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@

def _snapshot_by_url(url, file_name, workshop, auth=None):
try:
if auth:
r = requests.get(url, auth=auth, timeout=TIMEOUT, verify=False, headers=HEADERS)
if r.status_code == 200:
with open(file_name, 'wb') as f: f.write(r.content)
workshop.done_add()
else:
r = requests.get(url, timeout=TIMEOUT, verify=False, headers=HEADERS)
if r.status_code == 200:
with open(file_name, 'wb') as f: f.write(r.content)
workshop.done_add()

if auth: r = requests.get(url, auth=auth, timeout=TIMEOUT, verify=False, headers=HEADERS)
else: r = requests.get(url, timeout=TIMEOUT, verify=False, headers=HEADERS)
if r.status_code == 200:
Expand Down

0 comments on commit 2f09a9a

Please sign in to comment.