projects
/
services
/
jenkins-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e8cfc2
)
Verbose mode in sql query multi select
35/163435/1
author
hyokeun
<hyokeun.jeon@samsung.com>
Mon, 11 Dec 2017 07:05:10 +0000
(16:05 +0900)
committer
hyokeun
<hyokeun.jeon@samsung.com>
Mon, 11 Dec 2017 07:05:10 +0000
(16:05 +0900)
Change-Id: Ieba78b2b3b95110ca2c62ce4364f13b09eea7d8a
common/buildmonitor_db.py
patch
|
blob
|
history
diff --git
a/common/buildmonitor_db.py
b/common/buildmonitor_db.py
index
3c4df8c
..
b03022c
100644
(file)
--- a/
common/buildmonitor_db.py
+++ b/
common/buildmonitor_db.py
@@
-19,14
+19,16
@@
import MySQLdb
INVALID_ID = 0
-def get_multi_values_from_query_data(query, data):
+def get_multi_values_from_query_data(query, data
, verbose=True
):
try:
- print 'query(%s), data(%s)' % (query, data)
+ if verbose:
+ print 'query(%s), data(%s)' % (query, data)
cursor = conn.cursor()
cursor.execute(query, data)
ret_rows = cursor.fetchall()
- print 'ret_rows(%s)' % (ret_rows,)
+ if verbose:
+ print 'ret_rows(%s)' % (ret_rows,)
conn.commit()
cursor.close()