예제 #1
0
def load_tactic(dpath, basedir):
    """Load a tactic from the current layer using a dotted path. The last
    element in the path should be a Tactic subclass
    """
    obj = utils.load_class(dpath, basedir)
    if not issubclass(obj, Tactic):
        raise ValueError("Expected to load a tactic for %s" % dpath)
    return obj
예제 #2
0
def load_tactic(dpath, basedir):
    """Load a tactic from the current layer using a dotted path. The last
    element in the path should be a Tactic subclass
    """
    obj = utils.load_class(dpath, basedir)
    if not issubclass(obj, Tactic):
        raise ValueError("Expected to load a tactic for %s" % dpath)
    return obj
예제 #3
0
def load_tactic(dpath, basedir):
    """
    Load a tactic from the current layer using a dotted path.

    The final element in the path should be a
    :class:`~charmtools.build.tactics.Tactic` subclass.
    """
    obj = utils.load_class(dpath, basedir)
    if not issubclass(obj, Tactic):
        raise ValueError("Expected to load a tactic for %s" % dpath)
    return obj
예제 #4
0
def load_tactic(dpath, basedir):
    """
    Load a tactic from the current layer using a dotted path.

    The final element in the path should be a
    :class:`~charmtools.build.tactics.Tactic` subclass.
    """
    obj = utils.load_class(dpath, basedir)
    if not issubclass(obj, Tactic):
        raise ValueError("Expected to load a tactic for %s" % dpath)
    return obj