]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
client: Drop unimplemented commands
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Oct 2022 17:24:01 +0000 (17:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Oct 2022 17:24:01 +0000 (17:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/pakfire-client.in

index 2845802cf6411827628011e03d4c673d7096d097..71e252417cfd4e60988b79664869d6c7703eb117 100644 (file)
 
 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()