Added some error checks for sanity
[biaweb_qt.git] / biaweb_exporter.py
index 9531159..52d9a02 100644 (file)
@@ -416,8 +416,14 @@ def generate_home_page (dbname, conf, templates, category_str, bestrated_str):
 def generate_site (dbname, files_to_copy, folders_to_copy, search_type_full=True):
        # get the configuration
        conf = biaweb_db.get_configuration (dbname)
+       # if cannot get configuration
+       if conf == False:
+               return False
+
        # get the templates
        tpls = biaweb_db.get_templates (dbname)
+       if tpls == False:
+               return False
 
        # get the list of categories
        cats = biaweb_db.get_categories (dbname)