X-Git-Url: http://git.maemo.org/git/?p=gc-dialer;a=blobdiff_plain;f=src%2Fgc_backend.py;h=ec02e9002d70e3b568486835fb95cebc14107347;hp=50f2ece7ce5b5ba38bfa20c52a692413200b5fa1;hb=1a4e7c927e6772ec8fb6a4142d91c1a7fef99136;hpb=c68aa200522bfbb312150e4e90cbdab1d2b1197a diff --git a/src/gc_backend.py b/src/gc_backend.py index 50f2ece..ec02e90 100644 --- a/src/gc_backend.py +++ b/src/gc_backend.py @@ -1,23 +1,23 @@ #!/usr/bin/python -# DialCentral - Front end for Google's Grand Central service. -# Copyright (C) 2008 Eric Warnke ericew AT gmail DOT com -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - """ +DialCentral - Front end for Google's Grand Central service. +Copyright (C) 2008 Eric Warnke ericew AT gmail DOT com + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Grandcentral backend code """ @@ -28,13 +28,10 @@ import urllib import urllib2 import time import warnings +import traceback +from xml.sax import saxutils -from browser_emu import MozillaEmulator - -import socket - - -socket.setdefaulttimeout(5) +import browser_emu class GCDialer(object): @@ -47,11 +44,10 @@ class GCDialer(object): _accessTokenRe = re.compile(r"""]*value="(.*)"/>""") _isLoginPageRe = re.compile(r"""