Example #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"
Example #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"
Example #3
0
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))
Example #4
0
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))