kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
aaf115347e
commit
8dab5a8a13
10
common.py
10
common.py
|
@ -2,7 +2,7 @@
|
|||
import base64
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import threading
|
||||
import urllib.parse
|
||||
|
@ -65,8 +65,12 @@ DOMAIN_BLOCKLIST = (
|
|||
'twitter.com',
|
||||
)
|
||||
|
||||
with open(os.path.join(os.path.dirname(__file__), 'opt_outs.txt')) as f:
|
||||
OPT_OUT_IDS = util.load_file_lines(f)
|
||||
opt_outs = Path(__file__).parent / 'opt_outs.txt'
|
||||
if opt_outs.exists():
|
||||
with opt_outs.open() as f:
|
||||
OPT_OUT_IDS = util.load_file_lines(f)
|
||||
else:
|
||||
OPT_OUT_IDS = {'fake:bridgy-fed:test-opt-out'}
|
||||
|
||||
# populated in models.reset_protocol_properties
|
||||
SUBDOMAIN_BASE_URL_RE = None
|
||||
|
|
Ładowanie…
Reference in New Issue