Am 29. August 2011 18:21 schrieb Agata Murawska <[email protected]>:
> --- /dev/null
> +++ b/lib/ovf.py
> +class Converter(object):
> +  def __init__(self, input_path, options):
> +    input_path = os.path.abspath(input_path)
> +    if not (os.path.exists(input_path) and os.path.isfile(input_path)):

Is the former superfluous?

> --- /dev/null
> +++ b/tools/ovfconverter
> +def main():
> […]
> +  assert mode in ("import" "export")
> +  converter = None
> +  try:
> +    if mode == "import":

Please use constants for the modes. You use them in several places.

> +      converter = ovf.OVFImporter(input_path, options)
> +    elif mode == "export":
> +      converter = ovf.OVFExporter(input_path, options)
> +    converter.Parse()
> +    converter.Save()

Reply via email to