From a30c4d7ccb3c731cce24eebc133bc68690420853 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Tue, 25 Jan 2011 21:19:11 -0800 Subject: [PATCH] options: remove unused 'exe' parameter The 'exe' parameter was added in the hope of using it for additional contextual information in the help text that Options generates. It was till then abandoned and was judged as superflous information. Remove the 'exe' parameter from Options' constructor. (copied from the 'bup' project) Signed-off-by: Gabriel Filion --- main.py | 2 +- options.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 719f86a..5597177 100755 --- a/main.py +++ b/main.py @@ -68,7 +68,7 @@ server (internal use only) firewall (internal use only) hostwatch (internal use only) """ -o = options.Options('sshuttle', optspec) +o = options.Options(optspec) (opt, flags, extra) = o.parse(sys.argv[1:]) if opt.daemon: diff --git a/options.py b/options.py index 20a4e28..2f3fff6 100644 --- a/options.py +++ b/options.py @@ -76,9 +76,8 @@ class Options: By default, the parser function is getopt.gnu_getopt, and the abort behaviour is to exit the program. """ - def __init__(self, exe, optspec, optfunc=getopt.gnu_getopt, + def __init__(self, optspec, optfunc=getopt.gnu_getopt, onabort=_default_onabort): - self.exe = exe self.optspec = optspec self._onabort = onabort self.optfunc = optfunc