From d53334c398abcda78c71373ce76c41ef2b766466 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Sun, 18 Jan 2009 23:53:54 -0600
Subject: make sure   BEhostname is not null. Even though it should never
 happen, it's best to handle the error.

---
 abs/core-testing/LinHES-config/PKGBUILD   | 2 +-
 abs/core-testing/LinHES-config/timezip.py | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index c097873..dd78f2b 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=LinHES-config
 pkgver=1.0
-pkgrel=216
+pkgrel=217
 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
 pkgdesc="Install and configure your system"
 depends=(bc libstatgrab  mysql-python expect curl dnsutils parted sg3_utils nmbscan )
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()
-- 
cgit v0.12