Backwards logic, whoops
authorepage <eopage@byu.net>
Fri, 20 Mar 2009 00:38:03 +0000 (00:38 +0000)
committerepage <eopage@byu.net>
Fri, 20 Mar 2009 00:38:03 +0000 (00:38 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@233 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/gc_backend.py
src/gv_backend.py

index 8e38722..f664ca4 100644 (file)
@@ -314,12 +314,12 @@ class GCDialer(object):
        def _grab_token(self, data):
                "Pull the magic cookie from the datastream"
                atGroup = self._accessTokenRe.search(data)
-               if atGroup is not None:
+               if atGroup is None:
                        raise RuntimeError("Could not extract authentication token from GrandCentral")
                self._accessToken = atGroup.group(1)
 
                anGroup = self._accountNumRe.search(data)
-               if atGroup is not None:
+               if atGroup is None:
                        raise RuntimeError("Could not extract account number from GrandCentral")
                self._accountNum = anGroup.group(1)
 
index a7e5823..0d05d41 100644 (file)
@@ -374,12 +374,12 @@ class GVDialer(object):
                        accountNumberPage = self._browser.download(self._accountNumberURL)
 
                tokenGroup = self._tokenRe.search(accountNumberPage)
-               if tokenGroup is not None:
+               if tokenGroup is None:
                        raise RuntimeError("Could not extract authentication token from GrandCentral")
                self._token = tokenGroup.group(1)
 
                anGroup = self._accountNumRe.search(accountNumberPage)
-               if atGroup is not None:
+               if atGroup is None:
                        raise RuntimeError("Could not extract account number from GrandCentral")
                self._accountNum = anGroup.group(1)