diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2008-08-20 11:14:29 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2008-08-20 11:14:29 +0200 |
commit | 8edbfa73b1d84ab61ee2d843aaa6a3aa19904927 (patch) | |
tree | ca967298d657fc1617793abbc42cb46d7d573e8c /graph.py | |
parent | 6b11efeccabd730681ea4cf015c732dda007d8d9 (diff) | |
download | logilab-common-8edbfa73b1d84ab61ee2d843aaa6a3aa19904927.tar.gz |
put dotsource in /tmp to avoid deleting a dotfile previously in storedir
Diffstat (limited to 'graph.py')
-rw-r--r-- | graph.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -78,7 +78,9 @@ class DotBackend: outputfile = osp.join(storedir, basename) dotfile = dotfile or ('%s.dot' % self.graphname) dot_sourcepath = osp.join(storedir, dotfile) - pdot = file(dot_sourcepath, 'w') + if target != 'dot': + dot_sourcepath = osp.join('/tmp', dotfile) + pdot = open(dot_sourcepath, 'w') if isinstance(self.source, unicode): pdot.write(self.source.encode('UTF8')) else: |