[sugar] [PATCH] bin/datastore-service: respect $SUGAR_PROFILE, allowing multiple instances

Simon McVittie simon.mcvittie
Thu May 17 08:23:45 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- ---
 bin/datastore-service |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/datastore-service b/bin/datastore-service
index e2a96d9..cad9fc4 100755
- --- a/bin/datastore-service
+++ b/bin/datastore-service
@@ -7,7 +7,8 @@ from olpc.datastore import DataStore, DS_LOG_CHANNEL
 import logging
 
 # Path handling
- -base_dir = os.path.expanduser("~/.sugar/default")
+profile = os.environ.get('SUGAR_PROFILE', 'default')
+base_dir = os.path.join(os.path.expanduser('~'), '.sugar', profile)
 repo_dir = os.path.join(base_dir, 'datastore')
 db_dir   = "sqlite:///%s/datastore.db"  % repo_dir
 
- -- 
1.5.2-rc3.GIT

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFGTElRWSc8zVUw7HYRAuHfAKCfHnEt0Cj5eqRu0aS/khkNC9PRaQCaA+9u
1F7d7JpyxS7pis6wMeQkX1I=
=yfDN
-----END PGP SIGNATURE-----



More information about the Sugar-devel mailing list