← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 710630] Re: fglrx apport hook AssertionError in __setitem__

 

I just got to see the (kind of) duplicate bug 716143. This assertion

    and (hasattr(v[0], 'isalnum') or hasattr(v[0], 'read'))))

would hit if the value that gets passed is neither a string nor a file
object. In particular, it would error out like this if you try to pass
"None".

This can happen if the command you are calling produces an error:

def command_output_quiet(command_list):
    '''
    On errors, quell error message and just return empty string
    '''
    log = command_output(command_list)
    if log[:5] == "Error":
        return None
    return log

[...]

                ust = command_output_quiet([
                    '/usr/lib/nux/unity_support_test', '-p'])
                #ust = ust.replace('\x1b','').replace('[0;38;48m','').replace('[1;32;48m','')
                report['UnitySupportTest'] = ust

I. e. if the command produces any error, ust is None, and the assignment
to the report dictionary fails. Some invocations of command_output_quiet
are guarded with an if, some others call programs which really Should
Not Fail (tm), so these are probably okay.

I think the best approach here is to use command_output(), as we really
want to know about the actual error if unity_support_test fails.

** Changed in: xorg (Ubuntu)
       Status: Fix Released => Triaged

** Summary changed:

- fglrx apport hook AssertionError in __setitem__
+ apport hook AssertionError in __setitem__ when trying to assign None value

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in ubuntu.
https://bugs.launchpad.net/bugs/710630

Title:
  apport hook AssertionError in __setitem__ when trying to assign None
  value



References