From 402ae19223993bbf74b178e18808e75f7a3f320b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= Date: Sun, 17 Sep 2023 01:39:40 -0300 Subject: [PATCH] flake8 linting --- tests/test_utils.py | 2 ++ tubeup/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 224b9c1..813271a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -5,9 +5,11 @@ current_path = os.path.dirname(os.path.realpath(__file__)) + def get_testfile_path(name): return os.path.join(current_path, 'test_tubeup_files', name) + class UtilsTest(unittest.TestCase): def test_preserve_valid_identifiers(self): diff --git a/tubeup/utils.py b/tubeup/utils.py index 846c9fb..2be5b86 100644 --- a/tubeup/utils.py +++ b/tubeup/utils.py @@ -42,9 +42,9 @@ def strip_ip_from_url(url): if u.query != '': qs = parse_qs(u.query) try: - del(qs['ip']) + del (qs['ip']) u = u._replace(query=urlencode(qs, True)) - except: + except KeyError: pass return u.geturl()