Comment 1 for bug 1563565

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Something else that apparently changed. The text keys and values from the scout() result are now unicode, and that breaks the client elsewhere:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1201, in mainLoop
    self.runUntilCurrent()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 797, in runUntilCurrent
    f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 382, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/landscape/monitor/swiftusage.py", line 145, in _handle_usage
    timestamp, usage[key], persist_key)
  File "/usr/lib/python2.7/dist-packages/landscape/accumulate.py", line 81, in __call__
    previous_timestamp, accumulated_value = self._persist.get(key, (0, 0))
  File "/usr/lib/python2.7/dist-packages/landscape/lib/persist.py", line 385, in get
    return self.parent.get(self.root + path, default, soft, hard, weak)
exceptions.TypeError: can only concatenate tuple (not "unicode") to tuple

We only check for str in persist's get():
    def get(self, path, default=None, soft=False, hard=False, weak=False):
        if type(path) is str:
            path = path_string_to_tuple(path)
        return self.parent.get(self.root + path, default, soft, hard, weak)