def __handle_system_exit(self):
        # Unfortunately a SystemExit can be raised with all kinds of
        # wonky values.  This code attempts to determine the actual
        # exit status.
        code = None
        try:
            # according to the docs a None value for this is equivalent
            # to a 0 value.
            if self.exception is None or self.exception.code is None:
                code = 0
            else:
                code = int(self.exception.code)
        except ValueError:
            code = 1
        except AttributeError:
            # In Python 2.6, the exceptions are passed as strings sometimes.
            # Thus exception.code gets an AttributeError.
            try:
                code = int(self.exception)
            except ValueError:
                code = 1
        except:
            logger.exception(str(self.exception) % "Unknown exception: %s")

        if code is not None:
            if code is not 0:
                self._log_exception()
            logger.debug('Application exiting with status %d', code)
        else:
            self._log_exception()
        sys.exit(code)
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/util/application.py/Application.__handle_system_exit/swapped operands of `%`