Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Fix UnicodeDecodeError on fastboot.Download(filename) #179

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion adb/fastboot.py
Expand Up @@ -312,7 +312,7 @@ def Download(self, source_file, source_len=0,
"""
if isinstance(source_file, str):
source_len = os.stat(source_file).st_size
source_file = open(source_file)
source_file = open(source_file, mode='rb')

with source_file:
if source_len == 0:
Expand Down
2 changes: 1 addition & 1 deletion adb/fastboot_debug.py
Expand Up @@ -105,7 +105,7 @@ def main():
if 'info_cb' in argspec.args:
kwargs['info_cb'] = _InfoCb
if 'progress_callback' in argspec.args and progressbar:
bar = progressbar.ProgessBar(
bar = progressbar.ProgressBar(
widgets=[progressbar.Bar(), progressbar.Percentage()])
bar.start()

Expand Down