support python2.7 for the mean time

This commit is contained in:
mmonkey 2021-01-04 12:36:40 -06:00
parent 8cc06683df
commit 2c8d055ca4

View File

@ -20,7 +20,11 @@ from __future__ import division, print_function, unicode_literals
from cps import config, logger from cps import config, logger
from cps.services.worker import CalibreTask from cps.services.worker import CalibreTask
from urllib.request import urlopen
try:
from urllib.request import urlopen
except ImportError as e:
from urllib2 import urlopen
class TaskReconnectDatabase(CalibreTask): class TaskReconnectDatabase(CalibreTask):