summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/preferenceswindow.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-01-23 17:07:02 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-01-23 17:09:43 -0300
commitd4e53f6cef9ba2b476cc8308f132d8af20e79156 (patch)
tree22976e7b07816140ecfd05855e201ff104937ac6 /src/leap/bitmask/gui/preferenceswindow.py
parent2cb7443595a91857a4d037f2385ade5c8385d6a4 (diff)
Replace provider hardcoded path with helper.
Also reorder some imports and remove unused ones.
Diffstat (limited to 'src/leap/bitmask/gui/preferenceswindow.py')
-rw-r--r--src/leap/bitmask/gui/preferenceswindow.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py
index 517a90c4..b2cc2236 100644
--- a/src/leap/bitmask/gui/preferenceswindow.py
+++ b/src/leap/bitmask/gui/preferenceswindow.py
@@ -18,7 +18,6 @@
"""
Preferences window
"""
-import os
import logging
from functools import partial
@@ -26,6 +25,7 @@ from functools import partial
from PySide import QtCore, QtGui
from zope.proxy import sameProxiedObjects
+from leap.bitmask.provider import get_provider_path
from leap.bitmask.config.leapsettings import LeapSettings
from leap.bitmask.gui.ui_preferences import Ui_Preferences
from leap.soledad.client import NoStorageSecret
@@ -383,10 +383,7 @@ class PreferencesWindow(QtGui.QDialog):
:rtype: ProviderConfig or None if there is a problem loading the config
"""
provider_config = ProviderConfig()
- provider_config_path = os.path.join(
- "leap", "providers", domain, "provider.json")
-
- if not provider_config.load(provider_config_path):
+ if not provider_config.load(get_provider_path(domain)):
provider_config = None
return provider_config