python/thirdroc/thirdroc/__main__.py
author Gijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 06 Aug 2020 12:31:53 +0000
changeset 40124 f645a932dd65505d9215d13a57a79f46844da5ca
parent 38837 01043748e1e0d2792f8a4d1bf26038ddd82d054c
permissions -rw-r--r--
Bug 1654548 - fix printing in compose, view source, mail viewer, address book and attempt to improve state for calendar r=mkmelin a=wsmwk Differential Revision: https://phabricator.services.mozilla.com/D86013

# 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/.

from __future__ import absolute_import

import sys

from . import latest_version
from .rnp import rnp_source_update

FUNC_MAP = {
    'latest_version': latest_version,
    'rnp_source_update': rnp_source_update,
}


def main(args):
    _func = args[1]
    if _func in FUNC_MAP:
        FUNC_MAP[_func](*args[2:])
    else:
        raise Exception("Unknown function: {}".format(args[0]))


main(sys.argv)