Skip to content

Commit 312ae36

Browse files
committed
output files were wrong
1 parent be916bc commit 312ae36

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

python_scripts/get_traumatic_pages.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def main():
9797

9898
new_subcats = []
9999

100-
fs = [open("%s_%d" % (files[1], counter), "w"),
101-
open("%s_%d_talks" % (files[1], counter), "w")]
100+
fs = [open("%s_%d_talks" % (files[1], counter), "w"),
101+
open("%s_%d" % (files[1], counter), "w")]
102102
csv_writer = [csv.writer(x) for x in fs]
103103

104104
for subcat, is_t, is_nt, is_n, is_h in subcats:
@@ -147,6 +147,11 @@ def main():
147147
cursor.execute(query)
148148
edits_row = list(cursor.fetchone())
149149

150+
if t == 0:
151+
csv_writer[t].writerow(
152+
[page] + edits_row
153+
)
154+
150155
if int(edits_row[0]) > opts.min_edits and t == 1:
151156
belonging = [
152157
int(is_t), int(is_nt), int(is_n), int(is_h)

0 commit comments

Comments
 (0)