summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/MultiHome.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/MultiHome.py')
-rw-r--r--module/plugins/hooks/MultiHome.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py
index 9e2bcbe5f..cfea5952d 100644
--- a/module/plugins/hooks/MultiHome.py
+++ b/module/plugins/hooks/MultiHome.py
@@ -25,7 +25,7 @@ class MultiHome(Hook):
__version__ = "0.1"
__description__ = """ip address changer"""
__config__ = [ ("activated", "bool", "Activated" , "False"),
- ("interfaces", "str", "Interfaces" , "") ]
+ ("interfaces", "str", "Interfaces" , "None") ]
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
@@ -51,8 +51,9 @@ class MultiHome(Hook):
oldGetRequest = requestFactory.getRequest
def getRequest(pluginName, account=None, type="HTTP"):
iface = self.bestInterface(pluginName, account)
- iface.useFor(pluginName, account)
- requestFactory.iface = iface.adress
+ if iface:
+ iface.useFor(pluginName, account)
+ requestFactory.iface = iface.adress
return oldGetRequest(pluginName, account, type)
requestFactory.getRequest = getRequest