<W> jw-client-devops-web.py [ 29] Exiting jw-client-devops-web.py Exception ignored in: <function App.__del__ at 0x7f3ddeb8f560> Traceback (most recent call last): File "/home/jan/local/src/jw.dev/proj/jw-client-devops-web/src/python/jw/devops/client/web/cmds/App.py", line 43, in __del__ File "/home/jan/local/src/jw.dev/proj/jw-python/tools/python/jwutils/log.py", line 167, in slog File "/home/jan/local/src/jw.dev/proj/jw-python/tools/python/jwutils/log.py", line 126, in get_caller_pos AttributeError: 'NoneType' object has no attribute '__name__'
add_argument() at the face of it looks much like ArgumentParser.add_argument(), but is a function, not a class method. It takes the ArgsContainer|ArgParser instance as first argument, then decides what type it is, and proceeds to use this knowledge to decide whether or not the argument to be added already has a definition.
Add functions log.(add|rm)_capture_stream(). The functions are meant to capture everything passed to syslog into the stream objects installed by it. Not sure about future semantics changes: add_capture_stream() takes a currently unused flags argument, and it suppresses everything else logged until the stream is removed again.
If module is present in the log flags string, the module is prepended to each log message. The length of the module prefix can be set via the new set_module_name_length() function.
StringTree.find(key, val) (and Config.find(), for that matter) returns a list of paths with sections containing children matching key / val pairs. One of them can be None, which acts as a wildcard.
There's an assertion in StringTree.py.__set(), assert self.content != str(content), which often triggers. Not sure what the idea behind the assertion was, disable it.
These are meant to be called from different pieces of code:
- add_child_row_location() is meant to be used where the parent is rendered, to display a link to adding another child
- add_child_row_location_rules() and add_child_row_location_rule() are meant to be invoked where processing is going to be done, i.e. likely code rendering child row content
refuse_mode_mask can be passed to the constructor and determines which permission bits need to be absent from config file modes if they smell like they contain secrets.
Make Config's ctor accept strings as values for glob_paths, as opposed to lists. This covers the canonical case of one configuration file being passed.
The parsed args container is passed to the run() function and friends for convenient use. Sometimes, though, the base classes or umbrella commands need to make use of it, too, even more so as they may define command line arguments via add_arguments(). However, run() or _run() or whatever is never called on them, neither any other callback, so make args available to them as a member variable.