X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python%2Fovs%2Fjson.py;h=67470fcbcae921f9876fb591cb420967a846e51c;hb=264ecd63860eaf705669edac1bdc7292d8da0843;hp=f8b02d18004cbb640e303f8997269abf7704f9c6;hpb=be44585c21cc8dbe097a460a930696f0350dc12d;p=openvswitch diff --git a/python/ovs/json.py b/python/ovs/json.py index f8b02d18..67470fcb 100644 --- a/python/ovs/json.py +++ b/python/ovs/json.py @@ -113,7 +113,8 @@ def from_string(s): try: s = unicode(s, 'utf-8') except UnicodeDecodeError, e: - seq = ' '.join(["0x%2x" % ord(c) for c in e.object[e.start:e.end]]) + seq = ' '.join(["0x%2x" % ord(c) + for c in e.object[e.start:e.end] if ord(c) >= 0x80]) return ("not a valid UTF-8 string: invalid UTF-8 sequence %s" % seq) p = Parser(check_trailer=True) p.feed(s)