fb-tools 3.2.0__tar.gz → 3.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fb_tools-3.2.0 → fb_tools-3.2.1}/PKG-INFO +1 -1
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/__init__.py +1 -1
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_app.py +92 -3
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/handling_obj.py +3 -7
- {fb_tools-3.2.0 → fb_tools-3.2.1}/LICENSE +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/README.md +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/data/share/locale/de/LC_MESSAGES/fb_tools.mo +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/data/share/locale/en/LC_MESSAGES/fb_tools.mo +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/pyproject.toml +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/any_config.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/app.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/application/__init__.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/application/cfg_converter.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/application/get_file_rm.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/application/show_spinner.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/argparse_actions.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/__init__.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/dump.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/hjson.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/inifile.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/json.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/toml.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/cfg_options/yaml.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/colcts.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/collections.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/common.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/config.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/errors.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/handler/__init__.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/handler/lock.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/mailaddress.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/merge.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/multi_config/__init__.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/multi_config/files.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/multi_config/inits.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/obj.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/pidfile.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/socket_obj/__init__.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/socket_obj/tcp.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/socket_obj/unix.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/spinner.py +0 -0
- {fb_tools-3.2.0 → fb_tools-3.2.1}/src/fb_tools/xlate.py +0 -0
|
@@ -37,7 +37,7 @@ from .errors import MultiConfigError
|
|
|
37
37
|
from .multi_config import BaseMultiConfig
|
|
38
38
|
from .xlate import XLATOR
|
|
39
39
|
|
|
40
|
-
__version__ = "2.3.
|
|
40
|
+
__version__ = "2.3.4"
|
|
41
41
|
LOG = logging.getLogger(__name__)
|
|
42
42
|
|
|
43
43
|
|
|
@@ -46,7 +46,44 @@ _ = XLATOR.gettext
|
|
|
46
46
|
|
|
47
47
|
# =============================================================================
|
|
48
48
|
class FbConfigApplication(BaseApplication):
|
|
49
|
-
"""
|
|
49
|
+
"""
|
|
50
|
+
Class for configured application objects.
|
|
51
|
+
|
|
52
|
+
Properties:
|
|
53
|
+
* additional_cfg_file (pathlib.Path or None) - ro)
|
|
54
|
+
* address_family (str or int - rw) (inherited from HandlingObject)
|
|
55
|
+
* appname (str - rw) (inherited from FbBaseObject)
|
|
56
|
+
* argparse_epilog (None or str - ro) (inherited from BaseApplication)
|
|
57
|
+
* argparse_prefix_chars (str - ro) (inherited from BaseApplication)
|
|
58
|
+
* assumed_answer (None or bool - rw) (inherited from HandlingObject)
|
|
59
|
+
* base_dir (pathlib.Path - rw) (inherited from FbBaseObject)
|
|
60
|
+
* description (str - ro) (inherited from BaseApplication)
|
|
61
|
+
* exit_value (int - rw) (inherited from BaseApplication)
|
|
62
|
+
* exitvalue (int - rw) (inherited from BaseApplication)
|
|
63
|
+
* force (bool - rw) (inherited from HandlingObject)
|
|
64
|
+
* force_desc_msg (None or str - ro) (inherited from BaseApplication)
|
|
65
|
+
* initialized (bool - rw) (inherited from FbBaseObject)
|
|
66
|
+
* interrupted (bool - rw) (inherited from HandlingObject)
|
|
67
|
+
* is_venv (bool - ro) (inherited from HandlingObject)
|
|
68
|
+
* logfile (pathlib.Path or None) - ro)
|
|
69
|
+
* prompt_timeout (int - rw) (inherited from HandlingObject)
|
|
70
|
+
* quiet (bool - rw) (inherited from HandlingObject)
|
|
71
|
+
* simulate (bool - rw) (inherited from HandlingObject)
|
|
72
|
+
* testing_args (array od str - ro) (inherited from BaseApplication)
|
|
73
|
+
* usage (str - ro) (inherited from BaseApplication)
|
|
74
|
+
* usage_term None or int - ro) (inherited from BaseApplication)
|
|
75
|
+
* use_chardet (bool - rw)
|
|
76
|
+
* verbose (int - rw) (inherited from FbBaseObject)
|
|
77
|
+
* version (str - ro) (inherited from FbBaseObject)
|
|
78
|
+
|
|
79
|
+
Public attributes:
|
|
80
|
+
* add_search_paths Array of pathlib.Path (inherited from HandlingObject)
|
|
81
|
+
* arg_parser argparse.ArgumentParser (inherited from BaseApplication)
|
|
82
|
+
* args Namespace (inherited from BaseApplication)
|
|
83
|
+
* cfg BaseMultiConfig
|
|
84
|
+
* env Dict (inherited from BaseApplication)
|
|
85
|
+
* signals_dont_interrupt Array of int (inherited from HandlingObject)
|
|
86
|
+
"""
|
|
50
87
|
|
|
51
88
|
default_logfile = None
|
|
52
89
|
|
|
@@ -65,7 +102,59 @@ class FbConfigApplication(BaseApplication):
|
|
|
65
102
|
*args,
|
|
66
103
|
**kwargs,
|
|
67
104
|
):
|
|
68
|
-
"""
|
|
105
|
+
"""
|
|
106
|
+
Initialise a FbConfigApplication object.
|
|
107
|
+
|
|
108
|
+
@param cfg_class: The class of the configuration
|
|
109
|
+
@type: class
|
|
110
|
+
@param append_appname_to_stems: Append the application name to the list of file stems
|
|
111
|
+
of possible configuration files
|
|
112
|
+
@type: bool
|
|
113
|
+
@param config_dir: The base name of the configuration directory below /etc and ~/.config
|
|
114
|
+
@type: str
|
|
115
|
+
@param additional_stems: Additional stems of possible configuration files.
|
|
116
|
+
@type: list of str
|
|
117
|
+
@param additional_cfgdirs: additional directories to search for configuration files.
|
|
118
|
+
@type: list of pathlib.Path or str
|
|
119
|
+
@param cfg_encoding: the encoding of configuration files.
|
|
120
|
+
@type: str
|
|
121
|
+
@param use_chardet: Use character detection to detect the character encoding of
|
|
122
|
+
configuration files.
|
|
123
|
+
@type: bool
|
|
124
|
+
|
|
125
|
+
@param appname: name of the current running application
|
|
126
|
+
@type: str
|
|
127
|
+
@param argparse_epilog: an epilog displayed at the end of the argparse help screen
|
|
128
|
+
@type: str
|
|
129
|
+
@param argparse_prefix_chars: The set of characters that prefix optional arguments.
|
|
130
|
+
@type: str
|
|
131
|
+
@param assumed_answer: The assumed answer to all yes/no questions
|
|
132
|
+
@type: bool or None
|
|
133
|
+
@param base_dir: base directory used for different purposes
|
|
134
|
+
@type: str or pathlib.Path
|
|
135
|
+
@param description: a short text describing the application
|
|
136
|
+
@type: str
|
|
137
|
+
@param env_prefix: a prefix for environment variables to detect them and to assign
|
|
138
|
+
@type: None or str
|
|
139
|
+
@param force: Forced execution of something
|
|
140
|
+
@type: bool
|
|
141
|
+
@param initialized: initialisation of this object is complete after init
|
|
142
|
+
@type: bool
|
|
143
|
+
@param quiet: Quiet execution
|
|
144
|
+
@type: bool
|
|
145
|
+
@param simulate: actions with changing a state are not executed
|
|
146
|
+
@type: bool
|
|
147
|
+
@param terminal_has_colors: has the current terminal colored output
|
|
148
|
+
@type: bool
|
|
149
|
+
@param testing_args: Command line arguments to use for testing purposes.
|
|
150
|
+
@type: None or list of strings
|
|
151
|
+
@param verbose: verbosity level (0 - 9)
|
|
152
|
+
@type: int
|
|
153
|
+
@type: usage: usage text used on argparse
|
|
154
|
+
@type: str
|
|
155
|
+
@param version: version string of the current object or application
|
|
156
|
+
@type: str
|
|
157
|
+
"""
|
|
69
158
|
if not issubclass(cfg_class, BaseMultiConfig):
|
|
70
159
|
msg = _("Parameter {cls!r} must be a subclass of {clinfo!r}.").format(
|
|
71
160
|
cls="cfg_class", clinfo="BaseMultiConfig"
|
|
@@ -69,7 +69,7 @@ from .errors import WriteTimeoutError
|
|
|
69
69
|
from .obj import FbBaseObject
|
|
70
70
|
from .xlate import XLATOR, format_list
|
|
71
71
|
|
|
72
|
-
__version__ = "2.4.
|
|
72
|
+
__version__ = "2.4.9"
|
|
73
73
|
LOG = logging.getLogger(__name__)
|
|
74
74
|
|
|
75
75
|
_ = XLATOR.gettext
|
|
@@ -750,12 +750,8 @@ class HandlingObject(FbBaseObject):
|
|
|
750
750
|
raise ValueError(_("STDIN and input arguments may not both be used."))
|
|
751
751
|
kwargs["stdin"] = PIPE
|
|
752
752
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
for arg in popenargs[0]:
|
|
756
|
-
LOG.debug(_("Performing argument {!r}.").format(arg))
|
|
757
|
-
cmd_args.append(quote(arg))
|
|
758
|
-
cmd_str = " ".join(cmd_args)
|
|
753
|
+
if self.verbose > 2:
|
|
754
|
+
LOG.debug(_("Executing command args:") + "\n" + pp(popenargs))
|
|
759
755
|
|
|
760
756
|
cmd_str = " ".join((quote(x) for x in popenargs[0]))
|
|
761
757
|
LOG.debug(_("Executing: {}").format(cmd_str))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|