Blame scripts/bugzilla-cli
|
Jeff Mahoney |
829663 |
#!/usr/bin/python3
|
|
Jeff Mahoney |
3dff52 |
|
|
Jeff Mahoney |
3dff52 |
# This is a small wrapper script to simplify running the 'bugzilla'
|
|
Jeff Mahoney |
3dff52 |
# cli tool from a git checkout
|
|
Jeff Mahoney |
3dff52 |
|
|
Jeff Mahoney |
3dff52 |
import sys
|
|
Jeff Mahoney |
3dff52 |
import os
|
|
Jeff Mahoney |
3dff52 |
import os.path
|
|
Jeff Mahoney |
3dff52 |
scriptdir = os.path.dirname(sys.argv[0])
|
|
Jeff Mahoney |
3dff52 |
if scriptdir[0] != '/':
|
|
Jeff Mahoney |
3dff52 |
scriptdir = "{}/{}/bugzilla".format(os.getcwd(), scriptdir)
|
|
Jeff Mahoney |
3dff52 |
sys.path.insert(0, scriptdir)
|
|
Jeff Mahoney |
3dff52 |
|
|
Jeff Mahoney |
3dff52 |
from bugzilla import _cli
|
|
Michal Koutný |
4e69d7 |
if _cli.DEFAULT_BZ != "https://apibugzilla.suse.com":
|
|
Jeff Mahoney |
3dff52 |
raise RuntimeError("Use of this script requires the SUSE version of python-bugzilla.")
|
|
Jeff Mahoney |
3dff52 |
|
|
Jeff Mahoney |
3dff52 |
_cli.main()
|