diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-21 13:23:08 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-21 12:47:50 +0000 |
commit | 55b63ce2b6f9312c471b77bb06fae8fe71fd6513 (patch) | |
tree | f2ee9fb0b2e6ff2f5a60e5136c1a9f4a9606b0de /src | |
parent | 5eae254a7dd784349e8d5fdf07881644e0dd4dc5 (diff) |
3rdparty/t9write: unpack.py: Fix Python 2/3 compatibility
The commit bc84550e3ad3dd0f032d435415804bf9765b2f0f added an option
to unpack a directory. However, the feature was not compatible with
python 3 due to incorrect chmod parameter. This change fixes the
parameter so it works with python 2 and 3.
Change-Id: Iaf74f2be660d6ee5de6cd58cc9c983707b2a9364
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/virtualkeyboard/3rdparty/t9write/unpack.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtualkeyboard/3rdparty/t9write/unpack.py b/src/virtualkeyboard/3rdparty/t9write/unpack.py index 77bcbe1b..bf02a23a 100644 --- a/src/virtualkeyboard/3rdparty/t9write/unpack.py +++ b/src/virtualkeyboard/3rdparty/t9write/unpack.py @@ -180,7 +180,7 @@ def unzip(zip_file, target_dir): if not os.path.exists(dst_dir): os.makedirs(dst_dir) shutil.copy2(os.path.join(root, file_name), dst_dir) - os.chmod(os.path.join(dst_dir, file_name), 0644) + os.chmod(os.path.join(dst_dir, file_name), 0o644) zip_list.append(os.path.join(sub_dir, file_name).replace('\\', '/')) return zip_list with zipfile.ZipFile(zip_file, 'r') as z: |