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