From: Michael Tremer Date: Sun, 23 Oct 2022 17:24:01 +0000 (+0000) Subject: client: Drop unimplemented commands X-Git-Tag: 0.9.28~239 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04490da2973c496112e7c90c8c2dad6aa58d1bcb;p=pakfire.git client: Drop unimplemented commands Signed-off-by: Michael Tremer --- diff --git a/src/scripts/pakfire-client.in b/src/scripts/pakfire-client.in index 2845802cf..71e252417 100644 --- a/src/scripts/pakfire-client.in +++ b/src/scripts/pakfire-client.in @@ -21,10 +21,8 @@ import asyncio import argparse -import os.path import sys import tempfile -import time import pakfire.config import pakfire.hub @@ -72,20 +70,6 @@ class Cli(object): help=_("One or multiple IDs")) upload_delete.set_defaults(func=self._delete_upload) - # watch-build - watch_build = subparsers.add_parser("watch-build", - help=_("Watch the status of a build")) - watch_build.add_argument("id", - help=_("Build ID")) - watch_build.set_defaults(func=self._watch_build) - - # watch-job - watch_job = subparsers.add_parser("watch-job", - help=_("Watch the status of a job")) - watch_job.add_argument("id", - help=_("Job ID")) - watch_job.set_defaults(func=self._watch_job) - args = parser.parse_args() # Print usage if no action was given @@ -174,31 +158,6 @@ class Cli(object): print(_("Deleted upload %s") % upload_id) - async def _watch_build(self, hub, ns): - build = hub.get_build(ns.id[0]) - - return self._watch_something(build) - - async def _watch_job(self, hub, ns): - job = hub.get_job(ns.id[0]) - - return self._watch_something(job) - - async def _watch_something(self, o): - while True: - s = o.dump() - print(s) - - # Break the loop if the build/job is not active any more - # (since we don't expect any changes) - if not o.is_active(): - break - - time.sleep(60) - - # Update data before the next loop is shown - o.refresh() - if __name__ == "__main__": c = Cli()