added module bargparse to the project

This commit is contained in:
Tobias Diekershoff 2023-01-14 11:44:06 +01:00
parent c230c64680
commit 423897a9a3
3 changed files with 14 additions and 2 deletions

View file

@ -5,6 +5,13 @@ description = "A python script to collect the server-wide blocklists from Friend
authors = ["Tobias Diekershoff"]
license = "GNU General Public License v3.0"
readme = "README.md"
include = [
{ path = "src/brewserverblocklist" },
]
packages = [
{ include = "brewserverblocklist", from = "src"},
{ include = "bargparse", from = "src"}
]
[tool.poetry.scripts]
brewserverblocklist = "brewserverblocklist.brewserverblocklist:main"

View file

@ -0,0 +1,5 @@
#!/usr/bin/env python
# SPDX-FileCopyrightText: 2023 Tobias Diekershoff
#
# SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -12,7 +12,7 @@ import configparser
import sys
from os.path import exists
import requests
import bargparse
from bargparse.bargparse import MyParser
class BrewBlocklist():
"""
@ -157,7 +157,7 @@ def main():
* collect the ingredient
* serve the result
"""
parser = bargparse.MyParser()
parser = MyParser()
parser.add_argument('-c', '--config',
dest='configfile',
required=True,