From a53e8f056755f0dab4ef6375f97c5e1d1b196bba Mon Sep 17 00:00:00 2001 From: mhagger Date: Sun, 7 Dec 2008 13:54:25 +0000 Subject: [PATCH] Pass RunOptions.opts to GetoptOptions constructor. * cvs2svn_lib/run_options.py (GetoptOptions.__init__): Accept the destination list as a constructor parameter. (RunOptions.__init__): Pass self.opts to the GetoptOptions constructor. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@4668 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn_lib/run_options.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cvs2svn_lib/run_options.py b/cvs2svn_lib/run_options.py index cd82a894..52694e14 100644 --- a/cvs2svn_lib/run_options.py +++ b/cvs2svn_lib/run_options.py @@ -80,8 +80,8 @@ class GetoptOptions(object): to self.opts. These can be processed in a getopt-style option processing loop.""" - def __init__(self): - self.opts = [] + def __init__(self, opts): + self.opts = opts def __call__(self, *args, **kw): """Create an optparse-compatible Option object. @@ -131,7 +131,8 @@ class RunOptions: # A list of one list of SymbolStrategyRules for each project: self.project_symbol_strategy_rules = [] - go = GetoptOptions() + self.opts = [] + go = GetoptOptions(self.opts) parser = self.parser = optparse.OptionParser( usage=usage, @@ -479,7 +480,6 @@ class RunOptions: ) (self.options, self.args) = parser.parse_args() - self.opts = go.opts # Next look for any --options options, process them, and remove # them from the list, as they affect the processing of other -- 2.11.4.GIT