Skip to content

Commit

Permalink
+ if exit_code != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
troubadoour committed Nov 6, 2014
1 parent d13ba77 commit da5b74c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions usr/bin/whonix-repository-wizard
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ to understand the risks. </p>""")
exit_code = call(command, shell=True)
self.finishText.setText(self.finish_text_disabled)
mypath = inspect.getfile(inspect.currentframe())
message = "INFO %s: Ok, exit code of \"%s\" was %s." % ( mypath, command, exit_code )
if exit_code == 0:
message = "INFO %s: Ok, exit code of \"%s\" was %s." % ( mypath, command, exit_code )
else:
message = "ERROR %s: exit code of \"%s\" was %s." % ( mypath, command, exit_code )
command = 'echo ' + message
call(command, shell=True)
self.oneShot = False
Expand All @@ -136,7 +139,10 @@ to understand the risks. </p>""")
exit_code = call(command, shell=True)
self.finishText.setText(self.finish_text_enabled)
mypath = inspect.getfile(inspect.currentframe())
message = "INFO %s: Ok, exit code of \"%s\" was %s." % ( mypath, command, exit_code )
if exit_code == 0:
message = "INFO %s: Ok, exit code of \"%s\" was %s." % ( mypath, command, exit_code )
else:
message = "ERROR %s: exit code of \"%s\" was %s." % ( mypath, command, exit_code )
command = 'echo ' + message
call(command, shell=True)
self.oneShot = False
Expand Down

0 comments on commit da5b74c

Please sign in to comment.