diff options
author | Nicolas Chauvat <nicolas.chauvat@logilab.fr> | 2009-07-19 02:07:55 +0200 |
---|---|---|
committer | Nicolas Chauvat <nicolas.chauvat@logilab.fr> | 2009-07-19 02:07:55 +0200 |
commit | a1cdde3320add8bbe4557639488bb4d2ef2861fd (patch) | |
tree | f579949c7a7fb9b4efb8a6ccdfcd35484854662b /graph.py | |
parent | 6bb5a230a8df5ed2fe417c7b85491073da50dfd3 (diff) | |
download | logilab-common-a1cdde3320add8bbe4557639488bb4d2ef2861fd.tar.gz |
[cleanup] delete-trailing-whitespace
Diffstat (limited to 'graph.py')
-rw-r--r-- | graph.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -59,13 +59,13 @@ class DotBackend: return self._source source = property(get_source) - + def generate(self, outputfile=None, dotfile=None): """Generates a graph file. - + :param outputfile: filename and path [defaults to graphname.png] :param dotfile: filename and path [defaults to graphname.dot] - + :rtype: str :return: a path to the generated file """ @@ -93,7 +93,7 @@ class DotBackend: pdot.write(self.source) pdot.close() if target != 'dot': - os.system('%s -T%s %s -o%s' % (self.renderer, target, + os.system('%s -T%s %s -o%s' % (self.renderer, target, dot_sourcepath, outputfile)) os.unlink(dot_sourcepath) return outputfile @@ -127,7 +127,7 @@ class GraphGenerator: self.backend = backend def generate(self, visitor, propshdlr, outputfile=None): - # the visitor + # the visitor # the property handler is used to get node and edge properties # according to the graph and to the backend self.propshdlr = propshdlr @@ -182,7 +182,7 @@ def _get_cycles(graph_dict, vertice=None, path=None, result=None): def has_path(graph_dict, fromnode, tonode, path=None): """generic function taking a simple graph definition as a dictionary, with node has key associated to a list of nodes directly reachable from it. - + Return None if no path exists to go from `fromnode` to `tonode`, else the first path found """ |