From dd4aeffa4fe55ea75f7a342b7a2aa9c28e0015e0 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Mon, 6 Jul 2009 00:18:46 +0300 Subject: [PATCH] Remove obnoxious error window Do we really need that annoying error note about table viewer not working any longer? It's useless with postgres backend anyhow, so might as well kill it off entirely. --- pyfpdb/GuiTableViewer.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pyfpdb/GuiTableViewer.py b/pyfpdb/GuiTableViewer.py index 35dbb797..3693481f 100644 --- a/pyfpdb/GuiTableViewer.py +++ b/pyfpdb/GuiTableViewer.py @@ -24,19 +24,11 @@ import fpdb_simple try: import MySQLdb -except: - diaSQLLibMissing = gtk.Dialog(title="Fatal Error - SQL interface library missing", parent=None, flags=0, buttons=(gtk.STOCK_QUIT,gtk.RESPONSE_OK)) - - label = gtk.Label("Please note that the table viewer only works with MySQL, if you use PostgreSQL this error is expected.") - diaSQLLibMissing.vbox.add(label) - label.show() - - label = gtk.Label("Since the HUD now runs on all supported plattforms I do not see any point in table viewer anymore, if you disagree please send a message to steffen@sycamoretest.info") - diaSQLLibMissing.vbox.add(label) - label.show() - - response = diaSQLLibMissing.run() - #sys.exit(1) +except: # Try to make postgres case cleaner, and kill the error note + try: + import psycopg2 + except ImportError: + pass import fpdb_import import fpdb_db