commit 059644af4eb37e789419e0a40edf15760b16b6b3
Author: Radek Novacek <rnovacek(a)redhat.com>
Date: Wed Nov 6 10:56:27 2013 +0100
vdsm: Handle also NoSectionError in vdsm config file
vdsm.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vdsm.py b/vdsm.py
index e4a6b9e..957ea55 100644
--- a/vdsm.py
+++ b/vdsm.py
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
"""
import xmlrpclib
-from ConfigParser import SafeConfigParser, NoSectionError
+from ConfigParser import SafeConfigParser, NoSectionError, NoOptionError
import subprocess
class VdsmError(Exception):
@@ -55,7 +55,7 @@ class VDSM:
else:
self.trust_store_path = None
self.management_port = parser.get("addresses",
"management_port")
- except NoSectionError, e:
+ except (NoSectionError, NoOptionError), e:
raise VdsmError("Error in vdsm configuration file: %s" % str(e))
def _getLocalVdsName(self, tsPath):
Show replies by date