Although it is guarded with try/except, instead of checking for online state it
still solves the problem:
revno: 5528
committer: Mario Limonciello <[email protected]>
branch nick: ubiquity
timestamp: Wed 2012-06-27 19:21:51 -0500
message:
Don't let oem-config crash from an invalid server return on the timezone
page.
diff:
=== modified file 'debian/changelog'
--- debian/changelog 2012-06-27 21:46:17 +0000
+++ debian/changelog 2012-06-28 00:21:51 +0000
@@ -4,6 +4,10 @@
* Only allow a user to proceed on the networking screen if he entered a valid
password. This prevents a nm dbus exception. (LP: #112211)
+ [ Mario Limonciello ]
+ * Don't let oem-config crash from an invalid server return on the timezone
+ page.
+
-- Stéphane Graber <[email protected]> Wed, 27 Jun 2012 17:45:36 -0400
ubiquity (2.11.7) quantal-proposed; urgency=low
=== modified file 'ubiquity/plugins/ubi-timezone.py'
--- ubiquity/plugins/ubi-timezone.py 2012-05-29 23:07:53 +0000
+++ ubiquity/plugins/ubi-timezone.py 2012-06-28 00:21:51 +0000
@@ -176,15 +176,19 @@
(text, message.status_code,
message.reason_phrase))))
else:
- for result in json.loads(message.response_body.data):
- model.append([result['name'],
- result['admin1'],
- result['country'],
- result['latitude'],
- result['longitude']])
-
- # Only cache positive results.
- self.geoname_cache[text] = model
+ try:
+ for result in json.loads(message.response_body.data):
+ model.append([result['name'],
+ result['admin1'],
+ result['country'],
+ result['latitude'],
+ result['longitude']])
+
+ # Only cache positive results.
+ self.geoname_cache[text] = model
+
+ except ValueError:
+ syslog.syslog('Server return does not appear to be valid
JSON.')
self.city_entry.get_completion().set_model(model)
** Also affects: ubiquity (Ubuntu Precise)
Importance: Undecided
Status: New
** Also affects: ubiquity (Ubuntu Quantal)
Importance: Medium
Status: Triaged
** Changed in: ubiquity (Ubuntu Precise)
Status: New => Triaged
** Changed in: ubiquity (Ubuntu Precise)
Importance: Undecided => Medium
** Changed in: ubiquity (Ubuntu Precise)
Milestone: None => ubuntu-12.04.2
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/887879
Title:
ubiquity crashed with ValueError in raw_decode(): No JSON object could
be decoded
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/887879/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs