Failed to start if no Internet connection is available
u2ix opened this issue · comments
I like to start the script with the gnome session, but if there is not yet an Internet connection this will fail.
So the script should stay running and wait for connection.
Traceback (most recent call last): File "/.../gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 462, in myserver = CalendarServer(client) File "/.../gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 198, in __init__ self.calendars = self.get_calendars() File "/.../gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 247, in get_calendars feed = self.client.GetAllCalendarsFeed() File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 177, in get_all_calendars_feed **kwargs) File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 124, in get_calendars_feed desired_class=desired_class, **kwargs) File "/usr/lib/pymodules/python2.7/gdata/client.py", line 635, in get_feed **kwargs) File "/usr/lib/pymodules/python2.7/gdata/client.py", line 265, in request uri=uri, auth_token=auth_token, http_request=http_request, **kwargs) File "/usr/lib/pymodules/python2.7/atom/client.py", line 117, in request return self.http_client.request(http_request) File "/usr/lib/pymodules/python2.7/atom/http_core.py", line 420, in request http_request.headers, http_request._body_parts) File "/usr/lib/pymodules/python2.7/atom/http_core.py", line 489, in _http_request connection.endheaders() File "/usr/lib/python2.7/httplib.py", line 954, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 814, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 776, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1157, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known
i support this answer by having the same issue.
i'm a notebook user and always manually create an internet connection (HSDPA) when my session is alive again (except when i'm using wlan or lan)
The same goes for me!
It would be nice to have either a small delay at start-up, since in my case it takes a while for establishing a connection, or an option, that this script searches from time to time for a connection, when it failed to connect at start-up.