From 72e6bb73de7b91825b17b43c6a8bf560eb39987c Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Tue, 21 Apr 2009 13:34:01 -0400 Subject: [PATCH] Fix bug introduced in r356 where wicd would crash upon not finding dhclient. --- wicd/wnettools.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 243fbff..51ad50c 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -296,11 +296,13 @@ class BaseInterface(object): """ self.dhclient_cmd = self._find_program_path("dhclient") - output = misc.Run(self.dhclient_cmd + " --version", include_stderr=True) - if '4.' in output: - self.dhclient_needs_verbose = True - else: - self.dhclient_needs_verbose = False + if self.dhclient_cmd != None: + output = misc.Run(self.dhclient_cmd + " --version", + include_stderr=True) + if '4.' in output: + self.dhclient_needs_verbose = True + else: + self.dhclient_needs_verbose = False self.dhcpcd_cmd = self._find_program_path("dhcpcd") self.pump_cmd = self._find_program_path("pump")