From eb25f8bd1ab344d951f78cfe1e655e4f755bebd6 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sat, 29 Oct 2016 10:56:51 -0400 Subject: [PATCH 1/2] Write a script to verify identity --- bin/verify-identity.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bin/verify-identity.py diff --git a/bin/verify-identity.py b/bin/verify-identity.py new file mode 100644 index 0000000000..94b1785457 --- /dev/null +++ b/bin/verify-identity.py @@ -0,0 +1,15 @@ +"""verify-identity.py , +""" +from __future__ import absolute_import, division, print_function, unicode_literals + +import sys + +from gratipay import wireup +from gratipay.models.participant import Participant +from gratipay.models.country import Country + +wireup.db(wireup.env()) + +participant = Participant.from_id(int(sys.argv[1])) +country = Country.from_code(sys.argv[2]) +participant.set_identity_verification(country.id, True) From 683dabbccc5b8cdfcb8585f58ba5d20a57e58544 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sat, 29 Oct 2016 11:01:22 -0400 Subject: [PATCH 2/2] Make it executable with Python I was able to run this successfully on a one-off Heroku dyno. --- bin/verify-identity.py | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 bin/verify-identity.py diff --git a/bin/verify-identity.py b/bin/verify-identity.py old mode 100644 new mode 100755 index 94b1785457..df15614090 --- a/bin/verify-identity.py +++ b/bin/verify-identity.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python """verify-identity.py , """ from __future__ import absolute_import, division, print_function, unicode_literals