summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2009-05-07 12:08:47 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2009-05-07 12:08:47 +0200
commita61f6b51bc00941135977f621b2d1ffa7dea4c08 (patch)
tree9b9076c1007aea5572c06b05abb66343f2d2156a
parentec40d40d45fc7f862155ca976aac7d9d83f14295 (diff)
downloadlogilab-common-a61f6b51bc00941135977f621b2d1ffa7dea4c08.tar.gz
use endswith method
-rw-r--r--graph.py2
1 files changed, 1 insertions, 1 deletions
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