gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-survey] branch master updated (d382fb1 -> 7c898b3)


From: gnunet
Subject: [GNUnet-SVN] [taler-survey] branch master updated (d382fb1 -> 7c898b3)
Date: Mon, 27 May 2019 18:42:12 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a change to branch master
in repository survey.

    from d382fb1  readme
     new 44f74f2  readme
     new 7c898b3  upgrade/fix config logic

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README                     | 63 ++++++++++++++++++++++++++++++++++++++++++++++
 taler-merchant-survey.in   |  2 +-
 talersurvey/talerconfig.py |  4 ++-
 3 files changed, 67 insertions(+), 2 deletions(-)
 create mode 100644 README

diff --git a/README b/README
new file mode 100644
index 0000000..172e68f
--- /dev/null
+++ b/README
@@ -0,0 +1,63 @@
+Installation instructions
+-------------------------
+
+First, initialize the configure script.
+
+$ ./bootstrap
+
+Then, choose the installation prefix
+
+$ ./configure --prefix=<prefix>
+
+Last, install
+
+$ make install
+
+Optionally, to run tests:
+
+$ make check
+
+Configuration options.
+----------------------
+
+The following configuration excerpt shows all the options
+accepted by the survey shop.
+
+$ cat ~/.config/taler.conf
+
+[frontends]
+
+# Merchant backend to use.
+backend = http://backend.test.taler.net/
+
+# This value will fill: "Authorization: ApiKey <fill here>"
+backend_apikey = sandbox
+
+[survey]
+
+# The following three options configure the way the blog
+# will serve UWSGI requests via unix domain sockets.
+uwsgi_serve = unix
+uwsgi_unixpath = /path/to/survey.uwsgi
+uwsgi_unixpath_mode = 660
+
+# The following option picks the merchant instance that
+# will be represented by the running blog.
+instance = default
+
+Running instructions
+--------------------
+
+The following command launches the blog to serve HTTP requests
+on the port <port>.
+
+$ taler-merchant-survey serve-http -p <port>
+
+The following command launches the blog to serve UWSGI requests
+via a unix domain socket.
+
+$ taler-merchant-survey serve-uwsgi
+
+Finally, get a help message with the following command
+
+$ taler-merchant-survey --help
diff --git a/taler-merchant-survey.in b/taler-merchant-survey.in
index 4bb4eaf..a5d5403 100644
--- a/taler-merchant-survey.in
+++ b/taler-merchant-survey.in
@@ -36,7 +36,6 @@ site.addsitedir("%s/lib/python%d.%d/site-packages" % (
 
 
 ## @cond
-TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
 LOGGER = logging.getLogger(__name__)
 # No perfect match to our logging format, but good enough ...
 UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)"
@@ -115,5 +114,6 @@ if getattr(ARGS, 'func', None) is None:
 
 if ARGS.config is not None:
     os.environ["TALER_CONFIG_FILE"] = ARGS.config
+TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
 
 ARGS.func(ARGS)
diff --git a/talersurvey/talerconfig.py b/talersurvey/talerconfig.py
index 69d06a8..4a44c97 100644
--- a/talersurvey/talerconfig.py
+++ b/talersurvey/talerconfig.py
@@ -344,6 +344,7 @@ class TalerConfig:
                 filename = os.path.join(xdg, "taler.conf")
             else:
                 filename = os.path.expanduser("~/.config/taler.conf")
+            print("Loading default config: (%s)" % filename)
         if load_defaults:
             cfg.load_defaults()
         cfg.load_file(os.path.expanduser(filename))
@@ -496,7 +497,8 @@ class TalerConfig:
                                   value=value, filename=filename, 
lineno=lineno)
                     sections[current_section][key] = entry
         except FileNotFoundError:
-            LOGGER.error("Configuration file (%s) not found", filename)
+            # not logging here, as this interests the final user mostly.
+            print("Configuration file (%s) not found" % filename)
             sys.exit(3)
 
     ##

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]