Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Normalize accounts that were closed manually #2507

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions branch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os

import gittip
from gittip import wireup

gittip.RESTRICTED_USERNAMES = set(os.listdir('www'))

db = wireup.db(wireup.env())
deactivated = db.all("select participants.*::participants from participants "
"where username like 'deactivated-%'")

for p in deactivated:
print(p.username)
if not p.claimed_time:
p.set_as_claimed()
p.change_username(p.username[len('deactivated-'):])
p.close(disbursement_strategy=None)