From a61f6b51bc00941135977f621b2d1ffa7dea4c08 Mon Sep 17 00:00:00 2001 From: Emile Anclin Date: Thu, 7 May 2009 12:08:47 +0200 Subject: use endswith method --- graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.py b/graph.py index 2e11ab9..ca45aeb 100644 --- a/graph.py +++ b/graph.py @@ -72,7 +72,7 @@ class DotBackend: name = self.graphname if not dotfile: # if 'outputfile' is a dot file use it as 'dotfile' - if outputfile and outputfile[-4:]==".dot": + if outputfile and outputfile.endswith(".dot"): dotfile = outputfile else: dotfile = '%s.dot' % name -- cgit v1.2.1