String escape not unicode

Bug #1075756 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned

Bug Description

Odd error:

Here is log.

Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 267, in main_init
    freq=PER_INSTANCE)
  File "/usr/lib/python2.6/site-packages/cloudinit/cloud.py", line 63, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 179, in run
    return (True, results)
  File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 81, in lock
    yield self._acquire(name, freq)
  File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 178, in run
    results = functor(*args)
  File "/usr/lib/python2.6/site-packages/cloudinit/stages.py", line 402, in consume_userdata
    handlers.walk(user_data_msg, handlers.walker_callback, data=part_data)
  File "/usr/lib/python2.6/site-packages/cloudinit/handlers/__init__.py", line 202, in walk
    callback(data, ctype, filename, part.get_payload(decode=True))
  File "/usr/lib/python2.6/site-packages/cloudinit/handlers/__init__.py", line 174, in walker_callback
    details = "'%s...'" % (start.encode("string-escape"))
TypeError: escape_encode() argument 1 must be string, not unicode

Seems like we must force this to be a string, and not allow unicde here...

Related branches

Scott Moser (smoser)
Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Scott Moser (smoser) wrote :

fix-committed at trunk revno 698.

Changed in cloud-init:
status: Triaged → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.