quarks/games-util/pyfa/files/pyfa-1.21.4-html-export-path.patch

34 lines
1.3 KiB
Diff
Raw Normal View History

2016-11-16 07:51:47 +00:00
From a596f7f5398f613a607ecc91e06ea651806b8b63 Mon Sep 17 00:00:00 2001
2016-03-25 06:41:49 +00:00
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
---
2016-11-16 07:51:47 +00:00
service/settings.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
2016-03-25 06:41:49 +00:00
diff --git a/service/settings.py b/service/settings.py
2016-11-16 07:51:47 +00:00
index cd1b33b..a883ca1 100644
2016-03-25 06:41:49 +00:00
--- 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")
2016-11-16 07:51:47 +00:00
@@ -221,7 +222,7 @@ class HTMLExportSettings():
return cls._instance
2016-03-25 06:41:49 +00:00
def __init__(self):
2016-11-16 07:51:47 +00:00
- serviceHTMLExportDefaultSettings = {"enabled": False, "path": config.pyfaPath + os.sep + 'pyfaFits.html', "website": "null-sec.com", "minimal": False }
+ serviceHTMLExportDefaultSettings = {"enabled": False, "path": unicode(os.path.expanduser(os.path.join('~', 'pyfaFits.html')), sys.getfilesystemencoding()), "website": "null-sec.com", "minimal": False }
2016-03-25 06:41:49 +00:00
self.serviceHTMLExportSettings = SettingsProvider.getInstance().getSettings("pyfaServiceHTMLExportSettings", serviceHTMLExportDefaultSettings)
2016-11-16 07:51:47 +00:00
2016-03-25 06:41:49 +00:00
def getEnabled(self):
--
2016-11-16 07:51:47 +00:00
2.8.3
2016-03-25 06:41:49 +00:00