Zim

Merge lp:~hsoft/zim/fix-test into lp:~jaap.karssenberg/zim/pyzim

Proposed by Virgil Dupras
Status: Merged
Merged at revision: 676
Proposed branch: lp:~hsoft/zim/fix-test
Merge into: lp:~jaap.karssenberg/zim/pyzim
Diff against target: 19 lines (+8/-1)
1 file modified
zim/plugins/diagrameditor.py (+8/-1)
To merge this branch: bzr merge lp:~hsoft/zim/fix-test
Reviewer Review Type Date Requested Status
Jaap Karssenberg Approve
Review via email: mp+180738@code.launchpad.net

Description of the change

Fix broken test

To post a comment you must log in.
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Merged in pyzim-refactor

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'zim/plugins/diagrameditor.py'
2--- zim/plugins/diagrameditor.py 2013-04-10 19:14:33 +0000
3+++ zim/plugins/diagrameditor.py 2013-08-18 19:03:52 +0000
4@@ -111,7 +111,14 @@
5 except ApplicationError:
6 return None, None # Sorry, no log
7 else:
8- return self.pngfile, None
9+ if self.pngfile.exists():
10+ return self.pngfile, None
11+ else:
12+ # When supplying a dot file with a syntax error, the dot command
13+ # doesn't return an error code (so we don't raise
14+ # ApplicationError), but we still don't have a png file to
15+ # return, so return None.
16+ return None, None
17
18 def cleanup(self):
19 self.dotfile.remove()