From fe069d099faccee03cf90199ba920f2f18c11b7e Mon Sep 17 00:00:00 2001 From: Siddharth Dushantha Date: Thu, 21 Dec 2023 18:13:18 +0100 Subject: [PATCH] updated ruff syntax --- .github/workflows/main.yml | 2 +- sherlock/sherlock.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1ac254..dfa53be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - name: Lint with ruff run: | # stop the build if there are Python syntax errors or undefined names - ruff . --format=github --select=E9,F63,F7,F82 + ruff . -- --format=github --select=E9,F63,F7,F82 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Sherlock Site Detect Tests diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 9fbc8c1..bf68689 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -368,11 +368,11 @@ def sherlock( # Attempt to get request information try: http_status = r.status_code - except: + except Exception: http_status = "?" try: response_text = r.text.encode(r.encoding or "UTF-8") - except: + except Exception: response_text = "" query_status = QueryStatus.UNKNOWN