[core] Unbreak pdoc3/pytest command line arguments
This commit is contained in:
parent
8a32a80480
commit
0e53b900c0
2
.github/workflows/documentation.yml
vendored
2
.github/workflows/documentation.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pdoc3
|
pip install pdoc3
|
||||||
- name: Build documentation with pydoc3
|
- name: Build documentation with pdoc3
|
||||||
run: |
|
run: |
|
||||||
pdoc -f -o build --html ${{ env.packageName }}
|
pdoc -f -o build --html ${{ env.packageName }}
|
||||||
- name: Deploy documentation onto gh-pages
|
- name: Deploy documentation onto gh-pages
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from pytoml import load
|
from pytoml import load
|
||||||
|
from sys import argv
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -14,19 +15,20 @@ config = {
|
||||||
'root_url': 'http://localhost:8000/',
|
'root_url': 'http://localhost:8000/',
|
||||||
}
|
}
|
||||||
|
|
||||||
parser = ArgumentParser()
|
if argv[0] == 'kibicara':
|
||||||
parser.add_argument(
|
parser = ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
'-f',
|
'-f',
|
||||||
'--config',
|
'--config',
|
||||||
dest='configfile',
|
dest='configfile',
|
||||||
default='/etc/kibicara.conf',
|
default='/etc/kibicara.conf',
|
||||||
help='path to config file',
|
help='path to config file',
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(args.configfile) as configfile:
|
with open(args.configfile) as configfile:
|
||||||
config.update(load(configfile))
|
config.update(load(configfile))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
# run with default config
|
# run with default config
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue