浏览代码

Remove unused raise_getopt_errs

Mike Naberezny 10 年之前
父节点
当前提交
e92941c32d
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      supervisor/options.py

+ 3 - 5
supervisor/options.py

@@ -236,8 +236,7 @@ class Options:
             setattr(self, attr, value)
             self.attr_priorities[attr] = prio
 
-    def realize(self, args=None, doc=None,
-                progname=None, raise_getopt_errs=True):
+    def realize(self, args=None, doc=None, progname=None):
         """Realize a configuration.
 
         Optional arguments:
@@ -268,9 +267,8 @@ class Options:
         try:
             self.options, self.args = getopt.getopt(
                 args, "".join(self.short_options), self.long_options)
-        except getopt.error as msg:
-            if raise_getopt_errs:
-                self.usage(msg)
+        except getopt.error as exc:
+            self.usage(repr(exc))
 
         # Check for positional args
         if self.args and not self.positional_args_allowed: