From ac84c960561edfe9103e11843366df294788c8cd Mon Sep 17 00:00:00 2001 From: Mubashshir Date: Mon, 28 Sep 2020 17:10:26 +0600 Subject: [PATCH] fix compatibility with python 2 --- transmission-trackers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmission-trackers.py b/transmission-trackers.py index 14eb5f5..3098c90 100644 --- a/transmission-trackers.py +++ b/transmission-trackers.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +from __future__ import print_function # Host, port, username and password to connect to Transmission # Set user and pw to None if auth is not required @@ -56,7 +57,7 @@ exit() if sys.version_info[0] == 2: - from urllib import Request, urlopen + from urllib2 import Request, urlopen from urlparse import urlparse else: from urllib.request import Request, urlopen