hamster-applet r813 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r813 - trunk/hamster
- Date: Fri, 27 Feb 2009 23:51:04 +0000 (UTC)
Author: tbaugis
Date: Fri Feb 27 23:51:04 2009
New Revision: 813
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=813&view=rev
Log:
no more punishing user with countless sheets of sql statements!
use -t to see them
Modified:
trunk/hamster/__init__.py
trunk/hamster/db.py
trunk/hamster/hamster-applet.py
Modified: trunk/hamster/__init__.py
==============================================================================
--- trunk/hamster/__init__.py (original)
+++ trunk/hamster/__init__.py Fri Feb 27 23:51:04 2009
@@ -78,6 +78,7 @@
dispatcher = Dispatcher()
storage = None
+trace_sql = False
# Path to images, icons
ART_DATA_DIR = join(SHARED_DATA_DIR, "art")
Modified: trunk/hamster/db.py
==============================================================================
--- trunk/hamster/db.py (original)
+++ trunk/hamster/db.py Fri Feb 27 23:51:04 2009
@@ -607,7 +607,8 @@
con = self.connection
cur = con.cursor()
- print query, params
+ if hamster.trace_sql:
+ print query, params
if params:
cur.execute(query, params)
@@ -630,7 +631,9 @@
con = self.connection
cur = con.cursor()
- print statement, params
+ if hamster.trace_sql:
+ print statement, params
+
res = cur.execute(statement, params)
con.commit()
Modified: trunk/hamster/hamster-applet.py
==============================================================================
--- trunk/hamster/hamster-applet.py (original)
+++ trunk/hamster/hamster-applet.py Fri Feb 27 23:51:04 2009
@@ -89,13 +89,15 @@
start_window = None
try:
- opts, args = getopt.getopt(sys.argv[1:], "ws:", ["window", "start="])
+ opts, args = getopt.getopt(sys.argv[1:], "ws:t", ["window", "start=", "trace-sql"])
for opt, args in opts:
if opt in ("-w", "--window"):
standalone = True
elif opt in ("-s", "--start"):
start_window = args
+ elif opt in ("-t", "--trace-sql"):
+ hamster.trace_sql = True
except getopt.GetoptError:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]