Skip to content

Commit

Permalink
adb-sync: convert bytes to string in log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolalamacchia committed Mar 14, 2021
1 parent fb7c549 commit e13d28a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions adb-sync
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ class FileSyncer(object):
for name, s in self.src_only[i]:
src_name = self.src[i] + name
dst_name = self.dst[i] + name
logging.info('%s: %r', self.push[i], dst_name)
logging.info('%s: %r', self.push[i],
dst_name.decode('utf-8', 'replace'))
if stat.S_ISDIR(s.st_mode):
if not self.dry_run:
self.dst_fs[i].makedirs(dst_name)
Expand Down Expand Up @@ -863,7 +864,9 @@ def main() -> None:
return

for i in range(len(localpaths)):
logging.info('Sync: local %r, remote %r', localpaths[i], remotepaths[i])
logging.info('Sync: local %r, remote %r',
localpaths[i].decode('utf-8', 'replace'),
remotepaths[i].decode('utf-8', 'replace'))
syncer = FileSyncer(adb, localpaths[i], remotepaths[i], local_to_remote,
remote_to_local, preserve_times, delete_missing,
allow_overwrite, allow_replace, copy_links, dry_run)
Expand Down

0 comments on commit e13d28a

Please sign in to comment.