diff options
-rw-r--r-- | meta/classes/license.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 0ff6560a13..81458e797b 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -386,9 +386,9 @@ def copy_license_files(lic_files_paths, destdir): | |||
386 | if begin_idx is None and end_idx is None: | 386 | if begin_idx is None and end_idx is None: |
387 | shutil.copyfile(src, dst) | 387 | shutil.copyfile(src, dst) |
388 | else: | 388 | else: |
389 | with open(src, 'r') as src_f: | 389 | with open(src, 'rb') as src_f: |
390 | with open(dst, 'w') as dst_f: | 390 | with open(dst, 'wb') as dst_f: |
391 | dst_f.write(''.join(src_f.readlines()[begin_idx:end_idx])) | 391 | dst_f.write(b''.join(src_f.readlines()[begin_idx:end_idx])) |
392 | 392 | ||
393 | except Exception as e: | 393 | except Exception as e: |
394 | bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e)) | 394 | bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e)) |