예제 #1
0
def run_command(argv):
    if (len(argv) != 1):
        print 'Wrong number of arguments.'
        print 'Please pass the name of the file to unsign.'
        return

    fname = unsign_file(argv[0])
    if fname:
        print "unsigned file:", fname
    else:
        print "removing signature failed"
예제 #2
0
def run_command( argv ):
    if(len(argv) != 1):
        print 'Wrong number of arguments.'
        print 'Please pass the name of the file to unsign.'
        return

    fname = unsign_file( argv[0] )
    if fname:
        print "unsigned file:", fname
    else:
        print "removing signature failed"
예제 #3
0
파일: updated.py 프로젝트: Linutronix/elbe
def handle_update_file(upd_file, status, remove=False):
    with update_lock:
        status.log("checking file: " + str(upd_file))
        root, extension = os.path.splitext(upd_file)

        if extension == "gpg":
            fname = unsign_file(upd_file)
            if remove:
                os.remove(upd_file)
            if fname:
                action_select(fname, status)
                if remove:
                    os.remove(fname)
            else:
                status.log("checking signature failed: " + str(upd_file))

        elif status.nosign:
            action_select(upd_file, status)
            if remove:
                os.remove(upd_file)
        else:
            status.log("ignore file: " + str(upd_file))
예제 #4
0
파일: updated.py 프로젝트: lwalewski/elbe
def handle_update_file(upd_file, status, remove=False):
    with update_lock:
        status.log("checking file: " + str(upd_file))
        root, extension = os.path.splitext(upd_file)

        if extension == "gpg":
            fname = unsign_file(upd_file)
            if remove:
                os.remove(upd_file)
            if fname:
                action_select(fname, status)
                if remove:
                    os.remove(fname)
            else:
                status.log("checking signature failed: " + str(upd_file))

        elif status.nosign:
            action_select(upd_file, status)
            if remove:
                os.remove(upd_file)
        else:
            status.log("ignore file: " + str(upd_file))