more reliable testing for anki alpha

This commit is contained in:
Alex Yatskov 2017-07-05 21:29:46 -07:00
parent da7c1c8a45
commit 5517473072

View File

@ -23,6 +23,7 @@ import json
import os.path import os.path
import select import select
import socket import socket
import sys
# #
@ -42,25 +43,21 @@ NET_PORT = 8765
# General helpers # General helpers
# #
try: if sys.version_info[0] < 3:
import urllib2 import urllib2
web = urllib2 web = urllib2
except ImportError:
from PyQt4.QtCore import QTimer
from PyQt4.QtGui import QMessageBox
else:
unicode = str
from urllib import request from urllib import request
web = request web = request
try:
from PyQt4.QtCore import QTimer
from PyQt4.QtGui import QMessageBox
except ImportError:
from PyQt5.QtCore import QTimer from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QMessageBox
try:
unicode
except:
unicode = str
# #
# Helpers # Helpers