diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2008-09-09 18:52:27 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2008-09-09 18:52:27 +0200 |
commit | b65a2fe2612b7c180aadcb1d1eabd8f5375a0807 (patch) | |
tree | 3eb7258ef7c71de677b7047c2b40231120ed5bd1 | |
parent | a46eaf83ce840171507100261fa63e95f71d5469 (diff) | |
download | logilab-common-b65a2fe2612b7c180aadcb1d1eabd8f5375a0807.tar.gz |
fix emit_edge bug #5945
-rw-r--r-- | graph.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -54,7 +54,7 @@ class DotBackend: def get_source(self): """returns self._source""" if self._source is None: - self.emit("}") + self.emit("}\n") self._source = '\n'.join(self.lines) del self.lines return self._source @@ -104,8 +104,8 @@ class DotBackend: Authorized props: see http://www.graphviz.org/doc/info/attrs.html """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] - self.emit('edge [%s];' % ", ".join(attrs)) - self.emit('%s -> %s' % (normalize_node_id(name1), normalize_node_id(name2))) + n_from, n_to = normalize_node_id(name1), normalize_node_id(name2) + self.emit('%s -> %s edge [%s];' % (n_from, n_to, ", ".join(attrs)) ) def emit_node(self, name, **props): """Authorized props: see http://www.graphviz.org/doc/info/attrs.html |