If sys.exit is called or SystemExit raised, don't display success
authorRob Crittenden <rcritten@redhat.com>
Thu, 9 Apr 2015 23:20:25 +0000 (19:20 -0400)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Thu, 9 Apr 2015 23:44:00 +0000 (01:44 +0200)
If sys.exit is called, which raises SystemExit, the finally at the
end of the installer was treating it as a successful install and
displaying messages to the user. Catch this exception and mark
the install as failed to prevent this.

https://fedorahosted.org/ipsilon/ticket/66

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/install/ipsilon-server-install

index 67877a6..5ab163b 100755 (executable)
@@ -413,6 +413,9 @@ if __name__ == '__main__':
             print 'Installation aborted.'
         print 'See log file %s for details' % LOGFILE
         out = 1
+    except SystemExit:
+        out = 1
+        raise
     finally:
         if out == 0:
             if 'uninstall' in opts and opts['uninstall'] is True: