[Pkg-privacy-commits] [onionbalance] 113/117: Override config file location with ONIONBALANCE_CONFIG env variable

Donncha O'Cearbahill donncha-guest at moszumanska.debian.org
Wed Dec 16 23:18:55 UTC 2015


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

donncha-guest pushed a commit to branch debian/sid
in repository onionbalance.

commit d8f18758a2bc70e31e6e6f89a0a1855c7d065048
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date:   Wed Dec 16 16:41:31 2015 +0100

    Override config file location with ONIONBALANCE_CONFIG env variable
---
 onionbalance/manager.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/onionbalance/manager.py b/onionbalance/manager.py
index 6216560..cb47281 100644
--- a/onionbalance/manager.py
+++ b/onionbalance/manager.py
@@ -4,6 +4,7 @@ Load balance a hidden service across multiple (remote) Tor instances by
 create a hidden service descriptor containing introduction points from
 each instance.
 """
+import os
 import sys
 import argparse
 import time
@@ -41,7 +42,9 @@ def parse_cmd_args():
                         help="Tor controller port")
 
     parser.add_argument("-c", "--config", type=str,
-                        default="config.yaml", help="Config file location")
+                        default=os.environ.get('ONIONBALANCE_CONFIG',
+                                               "config.yaml"),
+                        help="Config file location")
 
     parser.add_argument("-v", "--verbosity", type=str, default="info",
                         help="Minimum verbosity level for logging.  Available "

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionbalance.git



More information about the Pkg-privacy-commits mailing list