summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/timezip.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-01-19 05:53:54 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-01-19 05:53:54 (GMT)
commitd53334c398abcda78c71373ce76c41ef2b766466 (patch)
treee8b74ba9825a81f02bde5f388f7da2baba04e139 /abs/core-testing/LinHES-config/timezip.py
parent2ec3b1a69288745b4211b4ffb0ad19a03b532154 (diff)
downloadlinhes_pkgbuild-d53334c398abcda78c71373ce76c41ef2b766466.zip
linhes_pkgbuild-d53334c398abcda78c71373ce76c41ef2b766466.tar.gz
linhes_pkgbuild-d53334c398abcda78c71373ce76c41ef2b766466.tar.bz2
make sure BEhostname is not null.
Even though it should never happen, it's best to handle the error.
Diffstat (limited to 'abs/core-testing/LinHES-config/timezip.py')
-rwxr-xr-xabs/core-testing/LinHES-config/timezip.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/timezip.py b/abs/core-testing/LinHES-config/timezip.py
index 18f338f..31acd67 100755
--- a/abs/core-testing/LinHES-config/timezip.py
+++ b/abs/core-testing/LinHES-config/timezip.py
@@ -45,7 +45,10 @@ def selectvars():
# execute SQL statement
cursor.execute("select hostname from settings where value='BackendServerIP' and data=(%s)",(masterdb))
result = cursor.fetchone()
- BEhostname=result[0]
+ try:
+ BEhostname=result[0]
+ except TypeError:
+ BEhostname=""
cursor.execute("select data from settings where value='HostZipcode' and hostname=(%s)",(BEhostname))
result = cursor.fetchone()