check for empty report seems to be wrong

Bug #760765 reported by Felix Lawrence
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
Low
Unassigned

Bug Description

    def get_new_weather_data(self, notif = True):
        weather = self.get_weather()
        if weather == None:

I don't think self.get_weather() ever returns 'None', even if the weather report is empty. Maybe we should try something like
if weather.__report.get('current_conditions') == None:
or write a weather method "current_conditions_is_blank"

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

I guess, this should be left an additional check for empty weather object - maybe, this is unnecessary. Yet adding additional clauses as 'current_conditions_is_blank' is a good idea

Changed in weather-indicator:
importance: Undecided → Low
milestone: none → 11.04.23
status: New → Confirmed
Changed in weather-indicator:
milestone: 11.04.23 → foggy
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

This is already fixed in foggy branch.

Changed in weather-indicator:
status: Confirmed → Fix Committed
assignee: nobody → Panagiotis Skintzos (ph7)
Changed in weather-indicator:
assignee: Panagiotis Skintzos (ph7) → nobody
Joshua Tasker (jtasker)
Changed in weather-indicator:
milestone: foggy → 13.06.01
status: Fix Committed → Fix Released
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.