File tree 1 file changed +12
-3
lines changed 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ def main():
109
109
AND cl_to = "%s"
110
110
""" % (subcat ,)
111
111
#print query
112
- cursor .execute (query )
112
+ try :
113
+ cursor .execute (query )
114
+ except :
115
+ print "ERROR! Subcat:" , subcat
116
+ continue
113
117
result_set = cursor .fetchall ()
114
118
#print result_set
115
119
print len (result_set )
@@ -137,14 +141,19 @@ def main():
137
141
138
142
if page_id != - 1 :
139
143
query = """
140
- SELECT COUNT(* ) AS tot_edits,
144
+ SELECT COUNT(DISTINCT rev_id ) AS tot_edits,
141
145
COUNT(DISTINCT rev_user) AS editors
142
146
FROM revision, user, user_groups
143
147
WHERE rev_page=%s AND
144
148
rev_user=user_id AND
145
149
user_id=ug_user AND
146
150
ug_group!="bot";""" % page_id
147
- cursor .execute (query )
151
+ try :
152
+ cursor .execute (query )
153
+ except :
154
+ print "Error! " , page
155
+ continue
156
+
148
157
edits_row = list (cursor .fetchone ())
149
158
150
159
if t == 0 :
You can’t perform that action at this time.
0 commit comments