This indicator evals json data (which is potentially dangerous) and the 
evaluated data has ['ResultSet']['Error'] as "0" (string value) while the code 
checks for 0, a number.
>>> '0' == 0
False

So the quick and dirty fix in this case is to modify the condition at line 367 
in indicator-weather to read:
if (yahoo_woeid_result['ResultSet']['Error'] != '0') and  
(yahoo_woeid_result['ResultSet']['Results'] != None):

But the proper fix is to rewrite the evals using json module.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to indicator-weather in Ubuntu.
https://bugs.launchpad.net/bugs/1093769

Title:
  indicator-weather Cannot add location

Status in “indicator-weather” package in Ubuntu:
  Confirmed

Bug description:
  When adding a location and finishing clicking the apply button,
  nothing happens.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: indicator-weather 11.11.28-0ubuntu1.2
  ProcVersionSignature: Ubuntu 3.2.0-35.55-generic-pae 3.2.34
  Uname: Linux 3.2.0-35-generic-pae i686
  ApportVersion: 2.0.1-0ubuntu15.1
  Architecture: i386
  Date: Wed Dec 26 10:42:23 2012
  InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 
(20120817.3)
  MarkForUpload: True
  PackageArchitecture: all
  SourcePackage: indicator-weather
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-weather/+bug/1093769/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to