From: epage Date: Thu, 28 May 2009 00:34:55 +0000 (+0000) Subject: * Fixing GC support and applying it to GV X-Git-Url: http://git.maemo.org/git/?p=gc-dialer;a=commitdiff_plain;h=b20d941d6f1cf8ce6916eaf1b43526fc56380f5c * Fixing GC support and applying it to GV * More single sourcing of version * More lint git-svn-id: file:///svnroot/gc-dialer/trunk@333 c39d3808-3fe2-4d86-a59f-b7f623ee9f21 --- diff --git a/Makefile b/Makefile index e943777..c8dc124 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ test: $(OBJ) build: $(OBJ) rm -Rf $(BUILD_PATH) mkdir $(BUILD_PATH) + cp $(SOURCE_PATH)/constants.py $(BUILD_PATH) cp $(SOURCE_PATH)/$(PROJECT_NAME).py $(BUILD_PATH) $(foreach file, $(DATA), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; ) $(foreach file, $(SOURCE), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; ) diff --git a/src/gc_backend.py b/src/gc_backend.py index 7600604..d5101f0 100644 --- a/src/gc_backend.py +++ b/src/gc_backend.py @@ -331,9 +331,10 @@ class GCDialer(object): self._accessToken = atGroup.group(1) anGroup = self._accountNumRe.search(data) - if anGroup is None: - raise RuntimeError("Could not extract account number from GrandCentral") - self._accountNum = anGroup.group(1) + if anGroup is not None: + self._accountNum = anGroup.group(1) + else: + warnings.warn("Could not extract account number from GrandCentral", UserWarning, 2) self._callbackNumbers = {} for match in self._callbackRe.finditer(data): diff --git a/src/gv_backend.py b/src/gv_backend.py index 514626a..2ae5230 100644 --- a/src/gv_backend.py +++ b/src/gv_backend.py @@ -447,9 +447,10 @@ class GVDialer(object): self._token = tokenGroup.group(1) anGroup = self._accountNumRe.search(page) - if anGroup is None: - raise RuntimeError("Could not extract account number from GoogleVoice") - self._accountNum = anGroup.group(1) + if anGroup is not None: + self._accountNum = anGroup.group(1) + else: + warnings.warn("Could not extract account number from GoogleVoice", UserWarning, 2) self._callbackNumbers = {} for match in self._callbackRe.finditer(page): diff --git a/support/builddeb.py b/support/builddeb.py index 1cc2097..b2db873 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -1,13 +1,14 @@ #!/usr/bin/python2.5 from py2deb import * +import constants -__appname__ = "dialcentral" +__appname__ = constants.__app_name__ __description__ = "Simple interface to Google's GrandCentral(tm) service" __author__ = "Ed Page" __email__ = "eopage@byu.net" -__version__ = "0.9.8" +__version__ = constants.__version__ __build__ = 0 __changelog__ = ''' 0.9.8 @@ -118,8 +119,8 @@ if __name__ == "__main__": p.section = "user/communication" p.arch = "all" p.urgency = "low" - p.distribution = "chinook diablo" - p.repository = "extras-devel" + p.distribution = "chinook diablo fremantle" + p.repository = "extras" p.changelog = __changelog__ p.postinstall = __postinstall__ p.icon="26x26-dialcentral.png" diff --git a/support/pylint.rc b/support/pylint.rc index 37b9725..2a371a1 100644 --- a/support/pylint.rc +++ b/support/pylint.rc @@ -53,7 +53,7 @@ load-plugins= #enable-msg= # Disable the message(s) with the given id(s). -disable-msg=W0403,W0612,W0613,C0103,C0111,C0301,R0903,W0142,W0603,R0904 +disable-msg=W0403,W0612,W0613,C0103,C0111,C0301,R0903,W0142,W0603,R0904,R0921,R0201 [REPORTS]