Revision 75eed2cf vncauthproxy/proxy.py

b/vncauthproxy/proxy.py
46 46
except ImportError:
47 47
    import json
48 48

  
49
from lockfile import LockTimeout
49 50
from gevent import socket
50 51
from signal import SIGINT, SIGTERM
51 52
from gevent import signal
......
463 464

  
464 465
    # Remove any stale PID files, left behind by previous invocations
465 466
    if daemon.runner.is_pidfile_stale(pidf):
467
        logger.warning("Removing stale PID lock file %s", pidf.path)
466 468
        pidf.break_lock()
467 469

  
468 470
    try:
469 471
        daemon_context.open()
470
    except daemon.pidlockfile.AlreadyLocked:
471
        logger.critical("Failed to lock pidfile %s, another instance running?",
472
    except (daemon.pidlockfile.AlreadyLocked, LockTimeout):
473
        logger.critical("Failed to lock PID file %s, another instance running?",
472 474
                        pidf.path)
473 475
        sys.exit(1)
474 476
    logger.info("Became a daemon")

Also available in: Unified diff