diff options
author | James Meyer <james.meyer@operamail.com> | 2009-08-17 17:16:31 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-08-17 17:16:31 (GMT) |
commit | 997dbedae9ea47fbb46ec15f8827cf1a8065c11e (patch) | |
tree | e20e579880f339682d8ede709369769269a365e0 /abs/mv-core/MythVantage-config/timezip.py | |
parent | da98b0f401f135cb5a04270dbfc46c5dafc43d9d (diff) | |
download | linhes_pkgbuild-997dbedae9ea47fbb46ec15f8827cf1a8065c11e.zip linhes_pkgbuild-997dbedae9ea47fbb46ec15f8827cf1a8065c11e.tar.gz linhes_pkgbuild-997dbedae9ea47fbb46ec15f8827cf1a8065c11e.tar.bz2 |
mv-core: bring it up to date so that it works again
Diffstat (limited to 'abs/mv-core/MythVantage-config/timezip.py')
-rwxr-xr-x | abs/mv-core/MythVantage-config/timezip.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/abs/mv-core/MythVantage-config/timezip.py b/abs/mv-core/MythVantage-config/timezip.py index 18f338f..bf6b389 100755 --- a/abs/mv-core/MythVantage-config/timezip.py +++ b/abs/mv-core/MythVantage-config/timezip.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- # import MySQL module #used to import the zipcode/timezone/nfs info fromMBE import MySQLdb @@ -45,7 +46,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() @@ -87,7 +91,7 @@ def selectvars(): try: tz_region=result[0] except TypeError: - tz="" + tz_region="" tempsubregion="HostTimeZoneRegion_" + tz_region cursor.execute("select data from settings where value=%s and hostname=(%s)",(tempsubregion,BEhostname)) |