diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-05-03 14:06:26 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-05-03 14:06:26 -0500 |
commit | 136d7397a067d815d986b49e06d6d3217fdb18f8 (patch) | |
tree | 2decb82d93bdd67365162ddfcbb472caffdbbd06 /src/lib/Options.py | |
parent | 20ed074b7a05b8b3817b1ca9a11d8a4b09b719ce (diff) | |
parent | 71a026b3b7c13fdf242d387b255d6e0daefce0ca (diff) | |
download | bcfg2-136d7397a067d815d986b49e06d6d3217fdb18f8.tar.gz bcfg2-136d7397a067d815d986b49e06d6d3217fdb18f8.tar.bz2 bcfg2-136d7397a067d815d986b49e06d6d3217fdb18f8.zip |
Merge branch 'py3k'
Diffstat (limited to 'src/lib/Options.py')
-rw-r--r-- | src/lib/Options.py | 6 |
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) |