smhg / sublime-suncycle

Sublime Text layout switch based on sunrise and sunset at your location.
MIT License
12 stars 6 forks source link

gracefully fail on missing connection #8

Closed smhg closed 10 years ago

smhg commented 10 years ago
SunCycle: <urlopen error [Errno 11004] getaddrinfo failed>
SunCycle: Failed to get a result from http://freegeoip.net/json/
Traceback (most recent call last):
  File "SunCycle.py", line 193, in start
    self.settings = Settings(onChange=self.cycle)
  File "SunCycle.py", line 43, in __init__
    self.load()
  File "SunCycle.py", line 139, in load
    sun = self.getSun()
  File "SunCycle.py", line 92, in getSun
    if 'latitude' in result and 'longitude' in result:
TypeError: argument of type 'NoneType' is not iterable