def __init__(self, args): """ Parse command and execute tasks. """ Command.__init__(self) self.args = args self.to_download = list() self.run()
def __init__(self, args): """ Parse command and execute tasks. """ Command.__init__(self) self.args = args args.types = args.types.split(',') if args.quiet: self.printer = lambda *a, **b: None self.run()
def __init__(self, args): """ Parse command, and execute tasks. """ Command.__init__(self) self.args = args backend.init(args.base_url, args.user_agent) self.register_subcommand('servers', self.servers) self.register_subcommand('channels', self.channels) self.register_subcommand('versions', self.versions) self.register_subcommand('builds', self.builds) self.register_subcommand('identify', self.identify) self.register_subcommand('download', self.download) self.invoke_subcommand(args.subcommand, (ValueError, URLError))
def __init__(self, args): """ Parse command, and execute tasks. """ Command.__init__(self) self.args = args backend.init(args.base_url, args.user_agent) self.register_subcommand("servers", self.servers) self.register_subcommand("channels", self.channels) self.register_subcommand("versions", self.versions) self.register_subcommand("builds", self.builds) self.register_subcommand("identify", self.identify) self.register_subcommand("download", self.download) self.invoke_subcommand(args.subcommand, (ValueError, URLError))
def __init__(self, args): """ Parse command, and execute tasks. """ Command.__init__(self) self.server = args.server self.args = args backend.init(args.base_url, args.user_agent) backend.VERSION = self.args.version self.register_subcommand('search', self.search) self.register_subcommand('info', self.info) self.register_subcommand('list', self.list) self.register_subcommand('download', self.download) self.register_subcommand('update', self.update) self.invoke_subcommand(args.subcommand, (ValueError, URLError))