diff --git a/qt_dotgraph/src/qt_dotgraph/pydotfactory.py b/qt_dotgraph/src/qt_dotgraph/pydotfactory.py index 39e60511..bee31eb6 100644 --- a/qt_dotgraph/src/qt_dotgraph/pydotfactory.py +++ b/qt_dotgraph/src/qt_dotgraph/pydotfactory.py @@ -176,7 +176,7 @@ def add_edge_to_graph( def create_dot(self, graph): dot = graph.create_dot() - if type(dot) != str: + if not isinstance(dot, str): dot = dot.decode() # sadly pydot generates line wraps cutting between numbers return dot.replace('\\%s' % os.linesep, '').replace('\\\n', '')