compute checksum crash when LazyFileContent used

Bug #1420352 reported by Maciej Kisielewski on 2015-02-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
High
Maciej Kisielewski

Bug Description

plainbox crashes when comparing units if at least one of them is using LazyFileContent

See attached file with test for details

Related branches

Maciej Kisielewski (kissiel) wrote :
Maciej Kisielewski (kissiel) wrote :

Backtrace from Checkbox-Touch
Traceback (most recent call last):
  File "/home/kissiel/test/checkbox/checkbox-touch/py/checkbox_touch.py", line 171, in wrapper
    result = func(*args, **kwargs)
  File "/home/kissiel/test/checkbox/checkbox-touch/py/checkbox_touch.py", line 362, in start_session
    self.context.add_provider(provider)
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/session/state.py", line 334, in add_provider
    self.add_unit(unit)
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/session/state.py", line 350, in add_unit
    if unit in self._unit_list:
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/unit/unit.py", line 440, in __eq__
    return self.checksum == other.checksum
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/unit/unit.py", line 717, in checksum
    self._checksum = self._compute_checksum()
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/unit/unit.py", line 740, in _compute_checksum
    default=default_fn)
  File "/usr/lib/python3.4/json/__init__.py", line 237, in dumps
    **kw).encode(obj)
  File "/usr/lib/python3.4/json/encoder.py", line 192, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.4/json/encoder.py", line 250, in iterencode
    return _iterencode(o, 0)
  File "/home/kissiel/test/checkbox/checkbox-touch/lib/py/plainbox/impl/unit/unit.py", line 735, in default_fn
    raise TypeError
TypeError

Changed in plainbox:
milestone: none → 0.20
Changed in plainbox:
assignee: nobody → Maciej Kisielewski (kissiel)
status: New → In Progress
Zygmunt Krynicki (zyga) on 2015-02-11
Changed in plainbox:
status: In Progress → Fix Committed
Changed in plainbox:
importance: Undecided → High
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers