Skip to content
Unverified Commit 6f235804 authored by Paul Wise's avatar Paul Wise
Browse files

Python 3: write files in binary mode

All the data being written is actually binary.

Traceback (most recent call last):
  File "../../bin/compare-source-package-list", line 1163, in <module>
    files, patches, links, new = process_sources(source_entries, lists_dir)
  File "../../bin/compare-source-package-list", line 1141, in process_sources
    actions = check_source_package(source_entry, srcpkg)
  File "../../bin/compare-source-package-list", line 1032, in check_source_package
    dsc_status, dsc_sha1 = status(dsc_hash_type, dsc_hash, dsc_url)
  File "../../bin/compare-source-package-list", line 442, in status
    (ret, sha1) = check_sha1_cache(hash, url)
  File "../../bin/compare-source-package-list", line 437, in check_sha1_cache
    return download_sha1(url, sha1_cache_dir, sha1)
  File "../../bin/compare-source-package-list", line 389, in download_sha1
    f.write(data)
TypeError: must be str, not bytes

Traceback (most recent call last):
  File "../../bin/compare-source-package-list", line 1163, in <module>
    files, patches, links, new = process_sources(source_entries, lists_dir)
  File "../../bin/compare-source-package-list", line 1141, in process_sources
    actions = check_source_package(source_entry, srcpkg)
  File "../../bin/compare-source-package-list", line 1103, in check_source_package
    patch_created = create_patch(tmp_dir, dsc_name, dsc_sha1, debian_tmp_dir, debian_dsc_name, debian_dsc_sha1)
  File "../../bin/compare-source-package-list", line 932, in create_patch
    f.write(diffstat_output)
TypeError: must be str, not bytes

Traceback (most recent call last):
  File "../../bin/compare-source-package-list", line 1163, in <module>
    files, patches, links, new = process_sources(source_entries, lists_dir)
  File "../../bin/compare-source-package-list", line 1141, in process_sources
    actions = check_source_package(source_entry, srcpkg)
  File "../../bin/compare-source-package-list", line 1105, in check_source_package
    patch_names = present_patch(name, version, dsc_sha1, debian_name, debian_version, debian_dsc_sha1)
  File "../../bin/compare-source-package-list", line 975, in present_patch
    useful_patch = check_patch(debian_dsc_sha1, dsc_sha1)
  File "../../bin/compare-source-package-list", line 962, in check_patch
    f.write(lsdiff)
TypeError: must be str, not bytes
parent 06890452
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment