OSDN Git Service

updateCheck: Raise RuntimeError on import if there is no updateVersionType, as update...
authorJames Teh <jamie@jantrid.net>
Mon, 5 Mar 2012 22:53:37 +0000 (08:53 +1000)
committerJames Teh <jamie@jantrid.net>
Mon, 5 Mar 2012 22:53:37 +0000 (08:53 +1000)
source/updateCheck.py

index 1974d4f..5e5964d 100644 (file)
@@ -5,15 +5,19 @@
 #Copyright (C) 2012 NV Access Limited\r
 \r
 """Update checking functionality.\r
+@note: This module may raise C{RuntimeError} on import if update checking for this build is not supported.\r
 """\r
 \r
+import versionInfo\r
+if not versionInfo.updateVersionType:\r
+       raise RuntimeError("No update version type, update checking not supported")\r
+\r
 import sys\r
 import os\r
 import threading\r
 import time\r
 import urllib\r
 import wx\r
-import versionInfo\r
 import languageHandler\r
 import gui\r
 from logHandler import log\r