summaryrefslogtreecommitdiffstats
path: root/src/lib/Options.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Options.py')
-rw-r--r--src/lib/Options.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 1973e7091..d5304e696 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -1,11 +1,12 @@
"""Option parsing library for utilities."""
__revision__ = '$Revision$'
-import ConfigParser
import getopt
import os
import sys
import Bcfg2.Client.Tools
+# Compatibility imports
+from Bcfg2.Bcfg2Py3k import ConfigParser
def bool_cook(x):
if x:
@@ -146,7 +147,8 @@ class OptionSet(dict):
try:
opts, args = getopt.getopt(argv, self.buildGetopt(),
self.buildLongGetopt())
- except getopt.GetoptError, err:
+ except getopt.GetoptError:
+ err = sys.exc_info()[1]
self.helpExit(err)
if '-h' in argv:
self.helpExit('', 0)