summaryrefslogtreecommitdiff
path: root/emf-dump.py
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2021-09-02 14:31:42 +0200
committerHossein <hossein@libreoffice.org>2021-09-02 17:01:42 +0430
commit9fab31d1f5cfb6e054da87082f9e77d29e150c9b (patch)
tree0b45d37318666f98f52f78fdcf3caf4247edf7c7 /emf-dump.py
parent926f5b3d21e97cbc659039aa7a03436e3826af0c (diff)
Fix emf-dump to work with Python 3.8
Using update() method instead of + operator for dict items After running with /opt/libreoffice7.2/program/python ./emf-dump.py test.emf This error was shown: Traceback (most recent call last): File "./emf-dump.py", line 8, in <module> from msodumper import emfrecord File "msodumper/emfrecord.py", line 139, in <module> HatchStyle = dict(wmfrecord.HatchStyle.items() + EmfHatchStyle.items()) TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items' Also, in Python 3, the default encoding is utf-8, so using sys.setdefaultencoding("utf-8") is not needed/encouraged.
Diffstat (limited to 'emf-dump.py')
-rwxr-xr-xemf-dump.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/emf-dump.py b/emf-dump.py
index c40f101..614156a 100755
--- a/emf-dump.py
+++ b/emf-dump.py
@@ -7,9 +7,6 @@
from msodumper import emfrecord
import sys
-sys = reload(sys)
-sys.setdefaultencoding("utf-8")
-
class EMFDumper:
def __init__(self, filepath):