[Pkg-privacy-commits] [onionbalance] 84/117: Fix major issue with onionbalance-config which prevents it from generating torrc files on Python 2
Donncha O'Cearbahill
donncha-guest at moszumanska.debian.org
Wed Dec 16 23:18:51 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 a0d37513b918c3e8260a815cbbacaba73e4ba0bb
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date: Tue Jun 30 20:19:10 2015 +0100
Fix major issue with onionbalance-config which prevents it from generating torrc files on Python 2
---
onionbalance/settings.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/onionbalance/settings.py b/onionbalance/settings.py
index 3755e5c..e3c7897 100644
--- a/onionbalance/settings.py
+++ b/onionbalance/settings.py
@@ -300,7 +300,7 @@ def generate_config():
config_yaml = yaml.dump(settings_data, default_flow_style=False)
config_file_path = os.path.join(master_dir, 'config.yaml')
- with open(config_file_path, "tw") as config_file:
+ with open(config_file_path, "w") as config_file:
config_file.write(u"# OnionBalance Config File\n")
config_file.write(config_yaml)
logger.info("Wrote master service config file '%s'.",
@@ -310,7 +310,7 @@ def generate_config():
master_torrc_path = os.path.join(master_dir, 'torrc-server')
master_torrc_template = pkg_resources.resource_string(__name__,
'data/torrc-server')
- with open(master_torrc_path, "tw") as master_torrc_file:
+ with open(master_torrc_path, "w") as master_torrc_file:
master_torrc_file.write(master_torrc_template.decode('utf-8'))
# Try generate config files for each service instance
@@ -332,7 +332,7 @@ def generate_config():
instance_torrc = os.path.join(instance_dir, 'instance_torrc')
instance_torrc_template = pkg_resources.resource_string(
__name__, 'data/torrc-instance')
- with open(instance_torrc, "tw") as torrc_file:
+ with open(instance_torrc, "w") as torrc_file:
torrc_file.write(instance_torrc_template.decode('utf-8'))
# The ./ relative path prevents Tor from raising relative
# path warnings. The relative path may need to be edited manual
--
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