Skip to content

Commit

Permalink
pep8/pyflakes
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Apr 11, 2014
1 parent 226ad29 commit 158aabc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/collective/weather/portlets/weather.py
Expand Up @@ -68,7 +68,7 @@ def update(self):
self.current_city = {'location_id': location.value, 'name': location.title}

self.weather_info = None
if not self.current_city is None:
if self.current_city is not None:
weather_utility.update_weather_info(self.current_city['location_id'])
self.weather_info = weather_utility.get_weather_info(self.current_city)

Expand Down
6 changes: 3 additions & 3 deletions src/collective/weather/tests/test_weather_portlet.py
Expand Up @@ -108,11 +108,11 @@ def test_render(self):
# XXX: at this point the weather information has already been
# updated by another test; we need to isolate this
# at first rendering no weather information is available
#self.assertIn(u'Cordoba, Argentina', r.render())
#self.assertIn(u'No weather information', r.render())
# self.assertIn(u'Cordoba, Argentina', r.render())
# self.assertIn(u'No weather information', r.render())

# call the update weather view and test again
#self.portal.unrestrictedTraverse('@@update-weather')()
# self.portal.unrestrictedTraverse('@@update-weather')()
self.assertIn(u'Cordoba, Argentina', r.render())
self.assertIn(u'Windy', r.render())
self.assertIn(u'20\xb0C', r.render())
2 changes: 1 addition & 1 deletion src/collective/weather/tests/test_weather_utility.py
Expand Up @@ -75,7 +75,7 @@ def test_update_locations(self):

self.assertEqual(actual_values, expected_values)

#restore old values
# restore old values
settings.location_ids = old_ids

def test_update_weather_info(self):
Expand Down
2 changes: 1 addition & 1 deletion src/collective/weather/weather_utility.py
Expand Up @@ -87,7 +87,7 @@ def _update_weather_info(self, location_id=None):
result = {'error': msg}
logger.info(u'Result: {0}'.format(result))

if not result == {} and not 'error' in result and \
if not result == {} and 'error' not in result and \
'temperature' in result and \
'summary' in result and \
'icon' in result:
Expand Down

0 comments on commit 158aabc

Please sign in to comment.