non set options make commands throw a KeyError

Donszelmann Mark donszelmann at riscure.com
Thu Mar 6 09:00:45 CST 2008


Hi

I am running commands from a python script in the following form:

         commands.bundle(self.ui, self.repo, bundle, dest,  
force=False, verbose=self.ui.verbose, quiet=self.ui.quiet)

if I however do NOT specify "force=False" the commands.bundle method  
throws me a
KeyError("force") as it has done a opts['force'] and not found any  
value.

Should hg commands not use some kind of get() option, or is there a  
way (other
than having to spell out any options checked by hg) to prevent the  
KeyError from being thrown.

Regards
Mark
===========================
Mark Donszelmann
Software Developer
Riscure
Telephone: +33450410319
Mobile: +41762462623
E-mail: donszelmann at riscure.com
Web: www.riscure.com



More information about the Mercurial mailing list