Fix wscript to support both Python 2 and Python 3.

This commit is contained in:
Daan De Meyer 2017-11-19 18:30:21 +01:00 committed by Jacob Dufault
parent e3a7be1cfe
commit 424c7b69db

View File

@ -1,8 +1,11 @@
#! /usr/bin/env python #! /usr/bin/env python
# encoding: utf-8 # encoding: utf-8
from urllib2 import urlopen # Python 2 try:
# from urllib.request import urlopen # Python 3 from urllib2 import urlopen # Python 2
except ImportError:
from urllib.request import urlopen # Python 3
import os.path import os.path
from subprocess import call from subprocess import call
import sys import sys