Skip to content

Commit

Permalink
Avoid printing a blank line when there was no error.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrilleGH authored and jrfonseca committed May 6, 2015
1 parent e40148f commit 126e65c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xdot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,8 @@ def run_filter(self, dotcode):
else:
xdotcode, error = p.communicate(dotcode)
error = error.rstrip()
sys.stderr.write(error + '\n')
if error:
sys.stderr.write(error + '\n')
if p.returncode != 0:
dialog = gtk.MessageDialog(type=gtk.MESSAGE_ERROR,
message_format=error,
Expand Down

0 comments on commit 126e65c

Please sign in to comment.