Skip to content

Commit

Permalink
chore: fix deepsource warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fredleger committed Jun 7, 2024
1 parent bf23e26 commit 4ac1d86
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions hub-tag-delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import os
import json
import fnmatch
import pprint as pp
from datetime import datetime

import requests
Expand Down Expand Up @@ -230,17 +229,11 @@ def tags_matching_pattern(pattern):
resp = session.get(_next, headers=headers)
try:
resp.raise_for_status()
# pp.pprint(resp.json())
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
# Handle the 404 error here
# You can choose to log the error or perform any other action
# print(f"Request details:\nURL: {resp.url}\nMethod: {resp.request.method}\nHeaders: {resp.request.headers}\nBody: {resp.request.body}\n")
# print(f"Response details:\nStatus Code: {resp.status_code}\nHeaders: {resp.headers}\nContent: {resp.content}\n")
break
else:
# Handle other HTTP errors
raise
raise

resp = resp.json()
for i in resp['results']:
Expand Down

0 comments on commit 4ac1d86

Please sign in to comment.