[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-util] branch master updated: addressing FIXMEs
From: |
gnunet |
Subject: |
[taler-taler-util] branch master updated: addressing FIXMEs |
Date: |
Tue, 22 Feb 2022 10:39:01 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository taler-util.
The following commit(s) were added to refs/heads/master by this push:
new ed67df9 addressing FIXMEs
ed67df9 is described below
commit ed67df9b7b39b7a2d56e43ea5094179b6d952bb1
Author: MS <ms@taler.net>
AuthorDate: Tue Feb 22 10:38:47 2022 +0100
addressing FIXMEs
---
doc/doc.org | 21 ++++++++++++++++++++-
taler/util/talerconfig.py | 2 +-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/doc/doc.org b/doc/doc.org
index ca727f3..cfe53a3 100644
--- a/doc/doc.org
+++ b/doc/doc.org
@@ -380,6 +380,10 @@ The canonical locations are:
FIXME: Comment in code: "not clear if this is a good idea" --
Maybe we should remove this functionality or leave it undocumented?
+ -> yes, I suggest not to advertise this feature, and equally to
+ remove it from the code. It is nowhere used, and there is no
+ need to pass through a _module_ just to obtain a value that
+ could be read from a env variable.
If =load_defaults= cannot find something to load it logs a warning
"no base directory found".
@@ -410,6 +414,7 @@ In the second one only, if the value of =X= is empty, use
the
value of =Y= instead.
FIXME: Can the second type be nested (i.e., =${X:-${Y:-Z}}=)?
+=> Yes.
For example, =${TMPDIR:-/tmp}/taler-test= expands to =/var/tmp/taler-test=
if environment variable =TMPDIR= has value =/var/tmp=, otherwise
@@ -449,7 +454,7 @@ It displays to stdout each section and its options (and
values)
in the format:
: [section]
-: option = value # FIXME (what is location?)
+: option = value # FIXME (what is location?) => location is a filename & line
number pair.
*** usage as a program
@@ -458,6 +463,20 @@ Seems out of place in a library.
Maybe it's there only for testing purposes?
Another idea is to move it to its own utility program.
+-> Better no, for those reasons:
+1. Taler has already a CLI config utility (that comes with the exchange):
taler-config.
+2. A try to run talerconfig.py gave this (!):
+
+ /tmp/talerconfig.py: line 23: import: command not found
+ /tmp/talerconfig.py: line 24: import: command not found
+ /tmp/talerconfig.py: line 25: import: command not found
+ /tmp/talerconfig.py: line 26: import: command not found
+ /tmp/talerconfig.py: line 27: import: command not found
+ /tmp/talerconfig.py: line 28: import: command not found
+ from: too many arguments
+ /tmp/talerconfig.py: line 31: syntax error near unexpected token `('
+ /tmp/talerconfig.py: line 31: `LOGGER = logging.getLogger(__name__)'
+
If =talerconfig.py= is invoked from the command-line, it functions
as a program that displays either a specific value or dumps the entire set,
depending on the command-line args given.
diff --git a/taler/util/talerconfig.py b/taler/util/talerconfig.py
index 79b722e..fa8d155 100644
--- a/taler/util/talerconfig.py
+++ b/taler/util/talerconfig.py
@@ -556,7 +556,7 @@ class TalerConfig:
# Format:
#
# [section]
- # option = value # FIXME (what is location?)
+ # option = value # location (filename & line number)
#
# @param self the object itself, that will be dumped.
def dump(self) -> None:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-util] branch master updated: addressing FIXMEs,
gnunet <=