| ... | ... |
@@ -1317,10 +1317,19 @@ class DotWidget(gtk.DrawingArea): |
| 1317 | 1317 |
[self.filter, '-Txdot'], |
| 1318 | 1318 |
stdin=subprocess.PIPE, |
| 1319 | 1319 |
stdout=subprocess.PIPE, |
| 1320 |
+ stderr=subprocess.PIPE, |
|
| 1320 | 1321 |
shell=False, |
| 1321 | 1322 |
universal_newlines=True |
| 1322 | 1323 |
) |
| 1323 |
- xdotcode = p.communicate(dotcode)[0] |
|
| 1324 |
+ xdotcode, error = p.communicate(dotcode) |
|
| 1325 |
+ if p.returncode != 0: |
|
| 1326 |
+ dialog = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, |
|
| 1327 |
+ message_format=error, |
|
| 1328 |
+ buttons=gtk.BUTTONS_OK) |
|
| 1329 |
+ dialog.set_title('Dot Viewer')
|
|
| 1330 |
+ dialog.run() |
|
| 1331 |
+ dialog.destroy() |
|
| 1332 |
+ return False |
|
| 1324 | 1333 |
try: |
| 1325 | 1334 |
self.set_xdotcode(xdotcode) |
| 1326 | 1335 |
except ParseError, ex: |