summaryrefslogtreecommitdiff
blob: e7614d21aa4d18dda396dc60dd4c50d0bd52d4e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 017938391c5b67327c489a5c3a6fc720d4204609 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Mon, 16 Jul 2012 05:43:38 -0400
Subject: [PATCH] Export fits to home directory, not python sitedir

---
 service/settings.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/service/settings.py b/service/settings.py
index 8f6e3a8..5ac386d 100644
--- a/service/settings.py
+++ b/service/settings.py
@@ -21,6 +21,7 @@ import cPickle
 import os.path
 import config
 import urllib2
+import sys
 
 class SettingsProvider():
     BASE_PATH = os.path.join(config.savePath, "settings")
@@ -199,7 +200,7 @@ class HTMLExportSettings():
         return cls._instance    
 
     def __init__(self):
-        serviceHTMLExportDefaultSettings = {"enabled": False, "path": config.pyfaPath + os.sep + 'pyfaFits.html' }
+        serviceHTMLExportDefaultSettings = {"enabled": False, "path": unicode(os.path.expanduser(os.path.join('~', 'pyfaFits.html')), sys.getfilesystemencoding()) }
         self.serviceHTMLExportSettings = SettingsProvider.getInstance().getSettings("pyfaServiceHTMLExportSettings", serviceHTMLExportDefaultSettings)
     
     def getEnabled(self):
-- 
1.7.8.6