From c69e04db2df7485b823338e482bdbc1cf6323e99 Mon Sep 17 00:00:00 2001 From: Ogi Date: Sat, 25 May 2019 00:21:37 -0700 Subject: [PATCH] Simpler way of extracting types from QByteArray Simpler way of extracting bytes from QByteArray --- pyqtgraph/exporters/SVGExporter.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyqtgraph/exporters/SVGExporter.py b/pyqtgraph/exporters/SVGExporter.py index dcd95c2b..b0e9b1c0 100644 --- a/pyqtgraph/exporters/SVGExporter.py +++ b/pyqtgraph/exporters/SVGExporter.py @@ -190,12 +190,7 @@ def _generateItemSvg(item, nodes=None, root=None, options={}): ## this is taken care of in generateSvg instead. #if hasattr(item, 'setExportMode'): #item.setExportMode(False) - - if QT_LIB in ['PySide', 'PySide2']: - xmlStr = str(arr) - else: - xmlStr = bytes(arr).decode('utf-8') - doc = xml.parseString(xmlStr.encode('utf-8')) + doc = xml.parseString(arr.data()) try: ## Get top-level group for this item