summaryrefslogtreecommitdiff
path: root/listsync.py
diff options
context:
space:
mode:
authorMagnus Hagander2020-07-11 16:25:40 +0000
committerMagnus Hagander2020-07-11 16:25:40 +0000
commit191eb97d6f90965b915f9165431b5165adf67796 (patch)
treef7532095123e4ce5a10ed73432d14c920bef092a /listsync.py
parentb7244f25838895dff84ab5499c799c01ddc80232 (diff)
Misc fixes to make pep8 happy
Mostly whitespace fixes, but also some bare-exception fixes. Add a setup.cfg that specifies which pep8 settings we normally run with.
Diffstat (limited to 'listsync.py')
-rwxr-xr-xlistsync.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/listsync.py b/listsync.py
index 9341dc8..c245607 100755
--- a/listsync.py
+++ b/listsync.py
@@ -13,7 +13,7 @@ import psycopg2
import requests
-if __name__=="__main__":
+if __name__ == "__main__":
c = configparser.ConfigParser()
c.read('planet.ini')
@@ -26,9 +26,10 @@ WHERE feeds.approved AND NOT feeds.archived
""")
syncstruct = [{'email': r[0]} for r in curs.fetchall()]
- r = requests.put('{0}/api/subscribers/{1}/'.format(c.get('list', 'server'), c.get('list', 'listname')),
- headers={'X-api-key': c.get('list', 'apikey')},
- json=syncstruct,
+ r = requests.put(
+ '{0}/api/subscribers/{1}/'.format(c.get('list', 'server'), c.get('list', 'listname')),
+ headers={'X-api-key': c.get('list', 'apikey')},
+ json=syncstruct,
)
if r.status_code != 200:
print("Failed to talk to pglister api: %s" % r.status_code)