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:
parent
f7794daa13
commit
6f1d685d9b
1 changed files with 2 additions and 2 deletions
|
|
@ -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/",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue