[elbe-devel] [PATCH 9/9] elbepack: config: drop global configuration dict
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Aug 1 12:40:30 CEST 2024
All configuration is now passed around explicitly.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/config.py | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/elbepack/config.py b/elbepack/config.py
index 98e2925afac4..a51ac65f288d 100644
--- a/elbepack/config.py
+++ b/elbepack/config.py
@@ -7,30 +7,6 @@ import os
from elbepack.cli import add_argument_to_parser_or_function
-class Config(dict):
- def __init__(self):
- dict.__init__(self)
- self['soaphost'] = 'localhost'
- self['soapport'] = '7587'
- self['elbeuser'] = 'root'
- self['elbepass'] = 'foo'
-
- if 'ELBE_SOAPPORT' in os.environ:
- self['soapport'] = os.environ['ELBE_SOAPPORT']
-
- if 'ELBE_SOAPHOST' in os.environ:
- self['soaphost'] = os.environ['ELBE_SOAPHOST']
-
- if 'ELBE_USER' in os.environ:
- self['elbeuser'] = os.environ['ELBE_USER']
-
- if 'ELBE_PASS' in os.environ:
- self['elbepass'] = os.environ['ELBE_PASS']
-
-
-cfg = Config()
-
-
def add_argument_soaptimeout(parser):
parser.add_argument(
'--soaptimeout',
--
2.45.2
More information about the elbe-devel
mailing list