On 2009-04-28 16:09:57 +0100, Catalin Marinas wrote: > The patch also adds the stgit.lib.git.clone() function. > if os.path.exists(local_dir): > - raise CmdException, '"%s" exists. Remove it first' % local_dir > - > - print 'Cloning "%s" into "%s"...' % (repository, local_dir) > + raise common.CmdException, '"%s" exists. Remove it first' % local_dir As recommended by PEP 8, consider using the "raise Exc(args)" syntax: - When raising an exception, use "raise ValueError('message')" instead of the older form "raise ValueError, 'message'". The paren-using form is preferred because when the exception arguments are long or include string formatting, you don't need to use line continuation characters thanks to the containing parentheses. The older form will be removed in Python 3000. > +def clone(remote, local): > + """Clone a remote repository using 'git clone'.""" > + run.Run('git', 'clone', remote, local).run() You don't capture git's output here, but just let it through. Does that look good in combination with the enclosing out.start() ... .done() stuff? -- Karl Hasselström, kha@xxxxxxxxxxx www.treskal.com/kalle -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html