Fix broken winreg imports
This commit is contained in:
parent
984ccbc1d1
commit
490cb90af8
|
@ -88,16 +88,19 @@ def main():
|
|||
parser.clean()
|
||||
|
||||
# Download the darwin.iso tgz file
|
||||
print 'Retrieving tools from: ' + url
|
||||
urllib.urlretrieve(url, convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip.tar'))
|
||||
|
||||
# Extract the tar to zip
|
||||
tar = tarfile.open(convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip.tar'), 'r')
|
||||
tar.extract('com.vmware.fusion.tools.darwin.zip', path=convertPath(dir + '/tools/'))
|
||||
tar.close()
|
||||
|
||||
# Extract the iso and sig files from zip
|
||||
zip = zipfile.ZipFile(convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip'), 'r')
|
||||
zip.extract('payload/darwin.iso', path=convertPath(dir + '/tools/'))
|
||||
zip.extract('payload/darwin.iso.sig', path=convertPath(dir + '/tools/'))
|
||||
zip.close()
|
||||
|
||||
# Move the iso and sig files to tools folder
|
||||
shutil.move(convertPath(dir + '/tools/payload/darwin.iso'), convertPath(dir + '/tools/darwin.iso'))
|
||||
|
|
|
@ -50,10 +50,10 @@ if sys.version_info < (2, 7):
|
|||
sys.exit(1)
|
||||
|
||||
# Setup imports depending on whether IronPython or CPython
|
||||
try:
|
||||
import _winreg
|
||||
except ImportError:
|
||||
pass
|
||||
if sys.platform == 'win32' \
|
||||
or sys.platform == 'cli':
|
||||
from _winreg import *
|
||||
|
||||
|
||||
def rot13(s):
|
||||
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'
|
||||
|
|
Loading…
Reference in New Issue