'Check inputs and run the command'

def handle(self, *args, **options):

    if isinstance(modulestore, XMLModuleStore):
        raise CommandError('This    script    requires    a    mongo    module    store')
    rdir_arg = None
    branch = None
    if options['directory_path']:
        rdir_arg = options['directory_path']
    if options['repository_branch']:
        branch = options['repository_branch']
    try:
        dashboard.git_import.add_repo(options['repository_url'], rdir_arg, branch)
    except GitImportError as ex:
        raise CommandError(str(ex))
