[Python-checkins] r88964 - tracker/instances/python-dev/detectors/rietveldreactor.py
martin.v.loewis
python-checkins at python.org
Fri May 25 15:21:34 CEST 2012
Author: martin.v.loewis
Date: Fri May 25 15:21:34 2012
New Revision: 88964
Log:
Skip rietveldreactor if no rietveld tables are present.
Modified:
tracker/instances/python-dev/detectors/rietveldreactor.py
Modified: tracker/instances/python-dev/detectors/rietveldreactor.py
==============================================================================
--- tracker/instances/python-dev/detectors/rietveldreactor.py (original)
+++ tracker/instances/python-dev/detectors/rietveldreactor.py Fri May 25 15:21:34 2012
@@ -56,6 +56,11 @@
c.execute("update codereview_issue set cc=%s where id=%s", (cc, nodeid))
def init(db):
+ c = db.cursor
+ c.execute("select table_name from information_schema.tables where table_name='auth_user'")
+ if not c.fetchall():
+ # Rietveld tables not present
+ return
db.user.react('create', create_django_user)
db.user.react('set', update_django_user)
db.issue.react('set', update_issue_cc)
More information about the Python-checkins
mailing list