Fix paver for python 3.
This commit is contained in:
@@ -224,7 +224,7 @@ def uninstall_python_packages():
|
||||
# So that we don't constantly uninstall things, use a hash of the packages
|
||||
# to be uninstalled. Check it, and skip this if we're up to date.
|
||||
hasher = hashlib.sha1()
|
||||
hasher.update(repr(PACKAGES_TO_UNINSTALL))
|
||||
hasher.update(repr(PACKAGES_TO_UNINSTALL).encode('utf-8'))
|
||||
expected_version = hasher.hexdigest()
|
||||
state_file_path = os.path.join(PREREQS_STATE_DIR, "Python_uninstall.sha1")
|
||||
create_prereqs_cache_dir()
|
||||
@@ -257,7 +257,7 @@ def uninstall_python_packages():
|
||||
|
||||
# Write our version.
|
||||
with io.open(state_file_path, "wb") as state_file:
|
||||
state_file.write(expected_version)
|
||||
state_file.write(expected_version.encode('utf-8'))
|
||||
|
||||
|
||||
def package_in_frozen(package_name, frozen_output):
|
||||
|
||||
@@ -131,7 +131,7 @@ def check_firefox_version():
|
||||
|
||||
# Firefox will be run as a local process
|
||||
expected_firefox_ver = "Mozilla Firefox " + str(MINIMUM_FIREFOX_VERSION)
|
||||
firefox_ver_string = subprocess.check_output("firefox --version", shell=True).strip()
|
||||
firefox_ver_string = subprocess.check_output("firefox --version", shell=True).strip().decode('utf-8')
|
||||
firefox_version_regex = re.compile(r"Mozilla Firefox (\d+.\d+)")
|
||||
try:
|
||||
firefox_ver = float(firefox_version_regex.search(firefox_ver_string).group(1))
|
||||
|
||||
Reference in New Issue
Block a user