Fix paver for python 3.

This commit is contained in:
Feanil Patel
2019-09-10 11:26:36 -04:00
parent 20dc162375
commit 61544f0e2c
2 changed files with 3 additions and 3 deletions

View File

@@ -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):

View File

@@ -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))