Beispiel #1
0
def main(name=None):
    if name not in ('__main__', None):
        return

    from mozapkpublisher import main_logging
    main_logging.init()

    UpdateDescriptionAPK().run()
def main(name=None):
    if name not in ('__main__', None):
        return

    from mozapkpublisher import main_logging
    main_logging.init()

    try:
        PushAPK().run()
    except WrongArgumentGiven as e:
        PushAPK.parser.print_help(sys.stderr)
        sys.stderr.write('{}: error: {}\n'.format(PushAPK.parser.prog, e))
        sys.exit(2)
Beispiel #3
0
    def download_all(self, version, build, locale):
        for arch in self.arch_values:
            self.download(version, build, arch, locale)

    # Download apk initial action
    def download_apk(self):
        self.check_argument()
        version = self.get_version_name()
        arch = self.config.arch
        build = str(self.config.build)
        locale = self.config.locale

        logger.info("Downloading version " + version + " build #" + build +
                    " for arch " + arch + " (locale " + locale + ")")
        if arch == "all":
            self.download_all(version, build, locale)
        else:
            self.download(version, build, arch, locale)

    def run(self):
        self.download_apk()


if __name__ == '__main__':
    from mozapkpublisher import main_logging
    main_logging.init()

    myScript = GetAPK()
    signal.signal(signal.SIGINT, myScript.signal_handler)
    myScript.run()