[Calypso-commits] [calypso] 08/09: Allow to override calypso's config dir
Guido Guenther
agx at moszumanska.debian.org
Sat Apr 9 17:45:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian
in repository calypso.
commit 89a7168dc612274143f6e6dca3dac8032a2848d0
Author: Guido Günther <agx at sigxcpu.org>
Date: Sat Apr 9 19:35:13 2016 +0200
Allow to override calypso's config dir
---
.../Allow-to-override-calypso-s-config-dir.patch | 24 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 25 insertions(+)
diff --git a/debian/patches/Allow-to-override-calypso-s-config-dir.patch b/debian/patches/Allow-to-override-calypso-s-config-dir.patch
new file mode 100644
index 0000000..825fbea
--- /dev/null
+++ b/debian/patches/Allow-to-override-calypso-s-config-dir.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Sat, 29 Mar 2014 22:54:44 +0100
+Subject: Allow to override calypso's config dir
+
+This can be useful when running automatic tests via e.g. autopkgtest
+where we want to have all files in a temporary directory.
+---
+ calypso/config.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/calypso/config.py b/calypso/config.py
+index dc17eec..59cbd85 100644
+--- a/calypso/config.py
++++ b/calypso/config.py
+@@ -72,6 +72,9 @@ for section, values in INITIAL_CONFIG.items():
+
+ _CONFIG_PARSER.read("/etc/calypso/config")
+ _CONFIG_PARSER.read(os.path.expanduser("~/.config/calypso/config"))
++cfg = os.getenv("CALYPSO_CONFIG")
++if cfg:
++ _CONFIG_PARSER.read(cfg)
+
+ # Wrap config module into ConfigParser instance
+ sys.modules[__name__] = _CONFIG_PARSER
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ee0188f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Allow-to-override-calypso-s-config-dir.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/calypso/calypso.git
More information about the Calypso-commits
mailing list