testing/mochitest/pywebsocket_wrapper.py
author Gaia Pushbot <release+gaiajson@mozilla.com>
Tue, 19 Nov 2013 20:55:23 -0800
changeset 156477 e6e3f1e79e5c6f3a59852eddcbe80510991e2616
parent 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 383465 dbe60b600dc0b9aabce3d197b438e4a6816f117e
permissions -rw-r--r--
Bumping gaia.json for 4 gaia-central revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/02cec9fa575a Author: Arthur Chen <crh0716@gmail.com> Desc: Merge pull request #13825 from dwi2/bug940162 Bug 940162 - Modify params passing to SimPinDialog.show in order to accommodate recent change r=kaze ======== https://hg.mozilla.org/integration/gaia-central/rev/49feca9e72fd Author: tzhuang <tzhuang@mozilla.com> Desc: Bug 940162 - Modify passing params of SimPinDialog.show in order to accommodate recent change ======== https://hg.mozilla.org/integration/gaia-central/rev/d2554196b5e4 Author: Reuben Morais <reuben.morais@gmail.com> Desc: Merge pull request #13853 from bgirard/HomescreenBorder Bug 939392 - Remove invisible border for better performance. r=crdlc ======== https://hg.mozilla.org/integration/gaia-central/rev/f75718f1c62d Author: Benoit Girard <b56girard@gmail.com> Desc: Bug 939392 - Remove invisible border for better performance. r=crdlc

#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

"""A wrapper around pywebsocket's standalone.py which causes it to ignore
SIGINT.

"""

import signal
import sys

if __name__ == '__main__':
    sys.path = ['pywebsocket'] + sys.path
    import standalone

    # If we received --interactive as the first argument, ignore SIGINT so
    # pywebsocket doesn't die on a ctrl+c meant for the debugger.  Otherwise,
    # die immediately on SIGINT so we don't print a messy backtrace.
    if len(sys.argv) >= 2 and sys.argv[1] == '--interactive':
        del sys.argv[1]
        signal.signal(signal.SIGINT, signal.SIG_IGN)
    else:
        signal.signal(signal.SIGINT, lambda signum, frame: sys.exit(1))

    standalone._main()