Skip to content

Commit

Permalink
Fix F422s
Browse files Browse the repository at this point in the history
  • Loading branch information
th3-z committed Sep 28, 2019
1 parent 68280fb commit c423b21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions magicked_admin/utils/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __add_address_scheme(address):
def __is_valid_address(address):
try:
code = urlopen(address).getcode()
except:
except Exception:
return False
return code == 200

Expand All @@ -26,7 +26,7 @@ def __follow_redirect(address):
response = urlopen(address)
redirect_url = urlparse(response.geturl())
return redirect_url.scheme + "://" + redirect_url.netloc
except:
except Exception:
return address


Expand All @@ -45,7 +45,7 @@ def phone_home():
try:
# See git.th3-z.xyz/www-th3-z-xyz/
code = urlopen("https://www.th3-z.xyz/kf2-ma-ping")
except:
except Exception:
return False
return code == 200

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pytest:

lint:
@echo "$(YELLOW_COLOR)Checking lints...$(NO_COLOR)\n"
@flake8 --ignore F405,F403,E722,W503,F401 --exclude=admin_patches/utils/patch.py && \
@flake8 --ignore F405,F403,W503,F401 --exclude=admin_patches/utils/patch.py && \
echo "$(GREEN_COLOR)success!$(NO_COLOR)" \
|| { echo "$(RED_COLOR)failure!$(NO_COLOR)\n"; exit 1; }

Expand Down

0 comments on commit c423b21

Please sign in to comment.