# -*- coding: utf-8 -*-
import click

from . import __version__


class JungleCLI(click.MultiCommand):

    """Jangle CLI main class"""

    def list_commands(self, ctx):
        """return available modules"""
        return ['ec2', 'elb', 'emr', 'asg']

    def get_command(self, ctx, name):
        """get command"""
        mod = __import__('jungle.' + name, None, None, ['cli'])
        return mod.cli


cli = JungleCLI(help="aws operation cli (v{})".format(__version__))


if __name__ == '__main__':
    cli()

@@ -308,24 +308,41 @@
  command%22%22%22%0A
+        try:%0A    
         mod 
@@ -397,24 +397,28 @@
 '%5D)%0A        
+    
 return mod.c
@@ -420,16 +420,61 @@
 mod.cli%0A
+        except ImportError:%0A            pass%0A
 %0A%0Acli = 
@@ -510,16 +510,17 @@
  cli (v%7B
+0
 %7D)%22.form

Fix unintended ImportError for wrong subcommnad