Skip to content

Commit ac84c96

Browse files
committed
fix compatibility with python 2
1 parent 1554e53 commit ac84c96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transmission-trackers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
from __future__ import print_function
23

34
# Host, port, username and password to connect to Transmission
45
# Set user and pw to None if auth is not required
@@ -56,7 +57,7 @@
5657
exit()
5758

5859
if sys.version_info[0] == 2:
59-
from urllib import Request, urlopen
60+
from urllib2 import Request, urlopen
6061
from urlparse import urlparse
6162
else:
6263
from urllib.request import Request, urlopen

0 commit comments

Comments
 (0)