Skip to content

Commit b1f0e39

Browse files
committed
Fix file options for spam-remover script, set content to single space.
1 parent 95731c6 commit b1f0e39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/spam-remover

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ def main():
9696
users = dict.fromkeys (db.user.lookup(u) for u in opt.users)
9797
files_to_remove = {}
9898
for fn in opt.filenames:
99-
for fid in db.files.filter(None,name=fn):
99+
for fid in db.file.filter(None,dict(name=fn)):
100100
if db.file.get(fid,'name') == fn:
101101
files_to_remove[fid] = True
102102
for fn in opt.file_pattern:
103-
for fid in db.files.filter(None,name=fn):
103+
for fid in db.file.filter(None,dict(name=fn)):
104104
if db.file.get(fid,'name').startswith(fn):
105105
files_to_remove[fid] = True
106106
files_found = {}
@@ -168,7 +168,7 @@ def main():
168168
db.setjournal(clsname, id, newjournal)
169169
if opt.doit:
170170
for f in files_found:
171-
db.file.set(f, content='')
171+
db.file.set(f, content=' ')
172172
db.commit()
173173
else:
174174
print "Database not changed"

0 commit comments

Comments
 (0)