plugin/builder: move argparse into main

The argparse import is only needed when the plugin is used as a
stand alone composer koji API client, therefore only include it
in main().
This commit is contained in:
Christian Kellner 2020-09-11 12:51:34 +02:00 committed by Tom Gundersen
parent f7794daa13
commit 6f1d685d9b

View file

@ -309,8 +309,6 @@ class OSBuildImage(BaseTaskHandler):
# Stand alone osbuild composer API client executable
import argparse
RESET = "\033[0m"
GREEN = "\033[32m"
BOLD = "\033[1m"
@ -361,6 +359,8 @@ def wait_cmd(client: Client, args):
def main():
import argparse # pylint: disable=import-outside-toplevel
parser = argparse.ArgumentParser(description="osbuild composer koji API client")
parser.add_argument("--url", metavar="URL", type=str,
default="http://localhost:8701/",