diff --git a/lutin.py b/lutin.py index 88881f7..c15d98c 100755 --- a/lutin.py +++ b/lutin.py @@ -126,11 +126,15 @@ def Start(): #remove previous target target = None else: - #load the target if needed : - if target == None: - target = lutinTarget.TargetLoad(targetName, compilator, mode, generatePackage) - target.Build(argument.GetOptionName()) - actionDone=True + if argument.GetOptionName() != "": + debug.warning("Can not understand argument : '" + argument.GetOptionName() + "'") + usage() + else: + #load the target if needed : + if target == None: + target = lutinTarget.TargetLoad(targetName, compilator, mode, generatePackage) + target.Build(argument.GetArg()) + actionDone=True # if no action done : we do "all" ... if actionDone==False: #load the target if needed : diff --git a/lutinArg.py b/lutinArg.py index 9df4e97..b1bbb60 100644 --- a/lutinArg.py +++ b/lutinArg.py @@ -15,9 +15,11 @@ class argElement: def Display(self): if len(self.m_arg)==0: - debug.info("element : " + self.m_option) + debug.info("option : " + self.m_option) + elif len(self.m_option)==0: + debug.info("element : " + self.m_arg) else: - debug.info("element : " + self.m_option + ":" + self.m_arg) + debug.info("option : " + self.m_option + ":" + self.m_arg) class argDefine: @@ -229,7 +231,7 @@ class lutinArg: if argumentFound==False: #unknow element ... ==> just add in the list ... debug.verbose("unknow argument : " + argument) - listArgument.append(argElement(argument, "")) + listArgument.append(argElement("", argument)) #for argument in listArgument: # argument.Display()