mirror of
https://github.com/paolo-projects/unlocker.git
synced 2025-07-27 16:04:38 +02:00
Fix broken winreg imports
This commit is contained in:
parent
984ccbc1d1
commit
490cb90af8
@ -88,16 +88,19 @@ def main():
|
|||||||
parser.clean()
|
parser.clean()
|
||||||
|
|
||||||
# Download the darwin.iso tgz file
|
# Download the darwin.iso tgz file
|
||||||
|
print 'Retrieving tools from: ' + url
|
||||||
urllib.urlretrieve(url, convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip.tar'))
|
urllib.urlretrieve(url, convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip.tar'))
|
||||||
|
|
||||||
# Extract the tar to zip
|
# Extract the tar to zip
|
||||||
tar = tarfile.open(convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip.tar'), 'r')
|
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.extract('com.vmware.fusion.tools.darwin.zip', path=convertPath(dir + '/tools/'))
|
||||||
|
tar.close()
|
||||||
|
|
||||||
# Extract the iso and sig files from zip
|
# Extract the iso and sig files from zip
|
||||||
zip = zipfile.ZipFile(convertPath(dir + '/tools/com.vmware.fusion.tools.darwin.zip'), 'r')
|
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', path=convertPath(dir + '/tools/'))
|
||||||
zip.extract('payload/darwin.iso.sig', 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
|
# Move the iso and sig files to tools folder
|
||||||
shutil.move(convertPath(dir + '/tools/payload/darwin.iso'), convertPath(dir + '/tools/darwin.iso'))
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
# Setup imports depending on whether IronPython or CPython
|
# Setup imports depending on whether IronPython or CPython
|
||||||
try:
|
if sys.platform == 'win32' \
|
||||||
import _winreg
|
or sys.platform == 'cli':
|
||||||
except ImportError:
|
from _winreg import *
|
||||||
pass
|
|
||||||
|
|
||||||
def rot13(s):
|
def rot13(s):
|
||||||
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'
|
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user