Comment 3 for bug 1092925

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: rotation_test crashes on 12.04.1 with nVidia-current driver installedl

The script is clearly broken due to scoping rules in python3:

    for rot in rotations:
        try:
            raise xrandr.RRError # added to test this
            status = rotate_screen(rotations[rot])
        except(xrandr.RRError, xrandr.UnsupportedRRError) as error:
            status = 1
        else:
            error = 'N/A'
        # Collect the status and the error message
        rots_statuses[rot] = (status, error)

The variable 'error' is not in scope at the last line as it's only bound during the except handler.