diff --git a/pavelib/utils/passthrough_opts.py b/pavelib/utils/passthrough_opts.py index 515c22ca5c..9a4995deba 100644 --- a/pavelib/utils/passthrough_opts.py +++ b/pavelib/utils/passthrough_opts.py @@ -13,15 +13,6 @@ import paver.tasks from mock import patch -try: - from gettext import gettext -except ImportError: - def gettext(message): - """Dummy gettext""" - return message -_ = gettext - - class PassthroughOptionParser(OptionParser): """ An :class:`optparse.OptionParser` which captures any unknown options into @@ -66,9 +57,9 @@ class PassthroughOptionParser(OptionParser): if len(rargs) < nargs: if nargs == 1: - self.error(_("%s option requires an argument") % opt) + self.error("%s option requires an argument" % opt) else: - self.error(_("%s option requires %d arguments") + self.error("%s option requires %d arguments" % (opt, nargs)) elif nargs == 1: value = rargs.pop(0) @@ -77,7 +68,7 @@ class PassthroughOptionParser(OptionParser): del rargs[0:nargs] elif had_explicit_value: - self.error(_("%s option does not take a value") % opt) + self.error("%s option does not take a value" % opt) else: value = None @@ -111,9 +102,9 @@ class PassthroughOptionParser(OptionParser): nargs = option.nargs if len(rargs) < nargs: if nargs == 1: - self.error(_("%s option requires an argument") % opt) + self.error("%s option requires an argument" % opt) else: - self.error(_("%s option requires %d arguments") + self.error("%s option requires %d arguments" % (opt, nargs)) elif nargs == 1: