diff --git a/ucs-4.0-1/management/univention-management-console/scripts/univention-management-console-server b/ucs-4.0-1/management/univention-management-console/scripts/univention-management-console-server index a4bb8f1..62fc3c8 100755 --- a/ucs-4.0-1/management/univention-management-console/scripts/univention-management-console-server +++ b/ucs-4.0-1/management/univention-management-console/scripts/univention-management-console-server @@ -38,6 +38,7 @@ import string import socket import signal import time +import lockfile from optparse import OptionParser @@ -208,10 +209,10 @@ if __name__ == "__main__": try: umc_daemon = UMC_Daemon() umc_daemon.do_action() - except DaemonRunnerStopFailureError, e: - CORE.process( 'Failed to shutdown server gracefully (may be its already dead): %s' % str( e ) ) - except DaemonRunnerStartFailureError, e: - CORE.process( 'Failed to start server: %s' % str( e ) ) + except DaemonRunnerStopFailureError as exc: + CORE.process('Failed to shutdown server gracefully (may be its already dead): %s' % (exc,)) + except (lockfile.LockTimeout, DaemonRunnerStartFailureError) as exc: + CORE.process('Failed to start server (maybe it already runs): %s: %s' % (type(e).__name__, exc)) except (SystemExit, KeyboardInterrupt): raise except: