You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/06/04 13:11:23 UTC

[incubator-ponymail-foal] 01/03: Extract constant

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 1ab55eca9c433cfe0ccf8c9570294ad54f478ead
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jun 4 13:13:54 2021 +0100

    Extract constant
---
 tools/setup.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/setup.py b/tools/setup.py
index 9b5b94b..2a10f7c 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -38,7 +38,7 @@ if sys.version_info < (3, 7, 3):
     )
     print("for operating the UI backend server.")
 
-
+DEFAULT_DB_URL = "http://localhost:9200/"
 dburl = ""
 dbname = ""
 mlserver = ""
@@ -178,7 +178,7 @@ print("")
 
 # If called with --defaults (like from Docker), use default values
 if args.defaults:
-    dburl = "http://localhost:9200/"
+    dburl =  DEFAULT_DB_URL
     dbname = "ponymail"
     mlserver = "localhost"
     mldom = "example.org"
@@ -222,9 +222,9 @@ if args.generator and any(x == "dkim" for x in args.generator.split(' ')) and ar
     nonce = args.nonce
 
 if not dburl:
-    dburl = input("What is the URL of the ElasticSearch server? [http://localhost:9200/]: ")
+    dburl = input("What is the URL of the ElasticSearch server? [%s]: " % DEFAULT_DB_URL)
     if not dburl:
-        dburl = "http://localhost:9200/"
+        dburl =  DEFAULT_DB_URL
 
 if not dbname:
     dbname = input("What would you like to call the mail index [ponymail]: ")