def get_pwd():
    """
    Return the current weblogic path. The domain name is stripped from this path.
    :return: path of current location.
    :raises: PyWLSTException: if a WLST error occurs
    """
    _method_name = 'get_pwd'
    _logger.finest('WLSDPLY-00033', class_name=_class_name, method_name=_method_name)
    try:
        path = wlst.pwd()[1:]
    except (wlst.WLSTException, offlineWLSTException), e:
        pwe = exception_helper.create_pywlst_exception('WLSDPLY-00034', _get_exception_mode(e),
                                                       _format_exception(e), error=e)
        _logger.throwing(class_name=_class_name, method_name=_method_name, error=pwe)
        raise pwe
示例#2
0
 def wrapper(*args):
     pwd = wlst.pwd()
     cd(location)
     result = func(*args)
     cd(pwd)
     return result
示例#3
0
def pwd():
    return wlst.pwd()