import traceback


def get_task_imports(ext):
    """Return a list of task modules provided by an extension."""
    try:
        includes = ext.obj.task_imports()
    except Exception:
        traceback.print_exc()
        print('Problem instantiating plugin %s, skipping' % ext.name)
        includes = []
    return includes