projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sha1: Avoid unused variable warnings on big-endian systems.
[openvswitch]
/
python
/
ovs
/
json.py
diff --git
a/python/ovs/json.py
b/python/ovs/json.py
index 1e26a62909240903acd476a61764f01782c49034..f8b02d18004cbb640e303f8997269abf7704f9c6 100644
(file)
--- a/
python/ovs/json.py
+++ b/
python/ovs/json.py
@@
-1,4
+1,4
@@
-# Copyright (c) 2010 Nicira Networks
+# Copyright (c) 2010
, 2011
Nicira Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@
-114,9
+114,7
@@
def from_string(s):
s = unicode(s, 'utf-8')
except UnicodeDecodeError, e:
seq = ' '.join(["0x%2x" % ord(c) for c in e.object[e.start:e.end]])
s = unicode(s, 'utf-8')
except UnicodeDecodeError, e:
seq = ' '.join(["0x%2x" % ord(c) for c in e.object[e.start:e.end]])
- raise Error("\"%s\" is not a valid UTF-8 string: "
- "invalid UTF-8 sequence %s" % (s, seq),
- tag="constraint violation")
+ return ("not a valid UTF-8 string: invalid UTF-8 sequence %s" % seq)
p = Parser(check_trailer=True)
p.feed(s)
return p.finish()
p = Parser(check_trailer=True)
p.feed(s)
return p.finish()