forked from indymedia/epicyon
Optionally pass session
parent
d354b8a339
commit
148fb121b3
|
@ -472,7 +472,8 @@ if args.postDomains:
|
||||||
elif args.gnunet:
|
elif args.gnunet:
|
||||||
proxyType = 'gnunet'
|
proxyType = 'gnunet'
|
||||||
domainList = []
|
domainList = []
|
||||||
domainList = getPublicPostDomains(baseDir, nickname, domain,
|
domainList = getPublicPostDomains(None,
|
||||||
|
baseDir, nickname, domain,
|
||||||
proxyType, args.port,
|
proxyType, args.port,
|
||||||
httpPrefix, debug,
|
httpPrefix, debug,
|
||||||
__version__, domainList)
|
__version__, domainList)
|
||||||
|
@ -510,7 +511,8 @@ if args.postDomainsBlocked:
|
||||||
elif args.gnunet:
|
elif args.gnunet:
|
||||||
proxyType = 'gnunet'
|
proxyType = 'gnunet'
|
||||||
domainList = []
|
domainList = []
|
||||||
domainList = getPublicPostDomainsBlocked(baseDir, nickname, domain,
|
domainList = getPublicPostDomainsBlocked(None,
|
||||||
|
baseDir, nickname, domain,
|
||||||
proxyType, args.port,
|
proxyType, args.port,
|
||||||
httpPrefix, debug,
|
httpPrefix, debug,
|
||||||
__version__, domainList)
|
__version__, domainList)
|
||||||
|
|
10
posts.py
10
posts.py
|
@ -3240,13 +3240,14 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str,
|
||||||
projectVersion, httpPrefix, domain)
|
projectVersion, httpPrefix, domain)
|
||||||
|
|
||||||
|
|
||||||
def getPublicPostDomains(baseDir: str, nickname: str, domain: str,
|
def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str,
|
||||||
proxyType: str, port: int, httpPrefix: str,
|
proxyType: str, port: int, httpPrefix: str,
|
||||||
debug: bool, projectVersion: str,
|
debug: bool, projectVersion: str,
|
||||||
domainList=[]) -> []:
|
domainList=[]) -> []:
|
||||||
""" Returns a list of domains referenced within public posts
|
""" Returns a list of domains referenced within public posts
|
||||||
"""
|
"""
|
||||||
session = createSession(proxyType)
|
if not session:
|
||||||
|
session = createSession(proxyType)
|
||||||
if not session:
|
if not session:
|
||||||
return domainList
|
return domainList
|
||||||
personCache = {}
|
personCache = {}
|
||||||
|
@ -3288,7 +3289,8 @@ def getPublicPostDomains(baseDir: str, nickname: str, domain: str,
|
||||||
return postDomains
|
return postDomains
|
||||||
|
|
||||||
|
|
||||||
def getPublicPostDomainsBlocked(baseDir: str, nickname: str, domain: str,
|
def getPublicPostDomainsBlocked(session, baseDir: str,
|
||||||
|
nickname: str, domain: str,
|
||||||
proxyType: str, port: int, httpPrefix: str,
|
proxyType: str, port: int, httpPrefix: str,
|
||||||
debug: bool, projectVersion: str,
|
debug: bool, projectVersion: str,
|
||||||
domainList=[]) -> []:
|
domainList=[]) -> []:
|
||||||
|
@ -3296,7 +3298,7 @@ def getPublicPostDomainsBlocked(baseDir: str, nickname: str, domain: str,
|
||||||
are globally blocked on this instance
|
are globally blocked on this instance
|
||||||
"""
|
"""
|
||||||
postDomains = \
|
postDomains = \
|
||||||
getPublicPostDomains(baseDir, nickname, domain,
|
getPublicPostDomains(session, baseDir, nickname, domain,
|
||||||
proxyType, port, httpPrefix,
|
proxyType, port, httpPrefix,
|
||||||
debug, projectVersion,
|
debug, projectVersion,
|
||||||
domainList)
|
domainList)
|
||||||
|
|
Loading…
Reference in New Issue