예제 #1
0
파일: editor.py 프로젝트: asilx/docker
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    try:
        docker_interface.file_rm(session['user_container_name'], path, True)
        return get_pkg_tree()
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete file. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
예제 #2
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    try:
        docker_interface.file_rm(session['user_container_name'], path, True)
        return get_pkg_tree()
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete file. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
예제 #3
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None: pkgName = session['pkg']

    try:
        docker_interface.file_rm(session['user_container_name'], pkgName, True)
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete package. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")

    return jsonify(success=1)
예제 #4
0
파일: editor.py 프로젝트: asilx/docker
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None: pkgName = session['pkg']
    
    try:
        docker_interface.file_rm(session['user_container_name'], pkgName, True)
    except:  # catch *all* exceptions
        app.logger.error("Unable to delete package. " + str(sys.exc_info()[0]))
        raise PackageError("An internal error occurred.")
    
    return jsonify(success=1)
예제 #5
0
def delete_pkg(package_name=None):
    pkg_name = _check_pkg_name_and_if_none_get_pkg_name_from_session(
        package_name)

    try:
        docker_interface.file_rm(session['user_container_name'], pkg_name,
                                 True)
    except Exception:  # catch *all* exceptions
        _log_unable_to_delete_pkg_error()
        raise PackageError("An internal error occurred.")

    return jsonify(success=1)
예제 #6
0
파일: editor.py 프로젝트: macnlinux/docker
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None:
        pkgName = session['pkg']
    docker_interface.file_rm(session['user_container_name'], pkgName, True)
    return jsonify(result=None)
예제 #7
0
파일: editor.py 프로젝트: macnlinux/docker
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    docker_interface.file_rm(session['user_container_name'], path, True)
    
    return get_pkg_tree()
예제 #8
0
def _remove_file_from_user_container(path):
    docker_interface.file_rm(session['user_container_name'], path, True)
예제 #9
0
def pkg_del(packageName=None):
    pkgName = packageName
    if pkgName is None:
        pkgName = session['pkg']
    docker_interface.file_rm(session['user_container_name'], pkgName, True)
    return jsonify(result=None)
예제 #10
0
def file_del():
    path = get_file_path(json.loads(request.data)['file'])
    docker_interface.file_rm(session['user_container_name'], path, True)

    return get_pkg_tree()