From: Oleg Broytman Date: Wed, 15 Nov 2023 21:28:08 +0000 (+0300) Subject: Fix(Py3): Fix `check_url.py` X-Git-Tag: 5.0.0~27 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=43c428bf639a603c34669f67989ff5343d2a02d7;p=bookmarks_db.git Fix(Py3): Fix `check_url.py` --- diff --git a/check_url.py b/check_url.py index 2da9d4d..bb13be2 100755 --- a/check_url.py +++ b/check_url.py @@ -9,21 +9,23 @@ __copyright__ = "Copyright (C) 2010-2023 PhiloSoft Design" __license__ = "GNU GPL" import sys -import httplib from bkmk_objects import Bookmark from Writers.bkmk_wflad import strftime -HTTP = httplib.HTTP +try: + import httplib +except ImportError: + pass +else: + HTTP = httplib.HTTP + class MyHTTP(HTTP): + def _setup(self, conn): + HTTP._setup(self, conn) + self.set_debuglevel(1) -class MyHTTP(HTTP): - def _setup(self, conn): - HTTP._setup(self, conn) - self.set_debuglevel(1) - - -httplib.HTTP = MyHTTP + httplib.HTTP = MyHTTP def run():