Snake case

main
Bob Mottram 2021-12-25 21:09:22 +00:00
parent 3a902e6011
commit 3c1c0f2feb
14 changed files with 261 additions and 261 deletions

200
daemon.py
View File

@ -701,7 +701,7 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.session:
return True
print('DEBUG: creating new session during ' + callingFunction)
self.server.session = createSession(self.server.proxyType)
self.server.session = createSession(self.server.proxy_type)
if self.server.session:
return True
print('ERROR: GET failed to create session during ' +
@ -1291,7 +1291,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
self.server.allowDeletion,
self.server.proxyType, version,
self.server.proxy_type, version,
self.server.debug,
self.server.yt_replace_domain,
self.server.twitter_replacement_domain,
@ -6846,7 +6846,7 @@ class PubServer(BaseHTTPRequestHandler):
def _getRSS2feed(self, authorized: bool,
callingDomain: str, path: str,
base_dir: str, http_prefix: str,
domain: str, port: int, proxyType: str,
domain: str, port: int, proxy_type: str,
GETstartTime,
debug: bool) -> None:
"""Returns an RSS2 feed for the blog
@ -6893,7 +6893,7 @@ class PubServer(BaseHTTPRequestHandler):
def _getRSS2site(self, authorized: bool,
callingDomain: str, path: str,
base_dir: str, http_prefix: str,
domainFull: str, port: int, proxyType: str,
domainFull: str, port: int, proxy_type: str,
translate: {},
GETstartTime,
debug: bool) -> None:
@ -6948,7 +6948,7 @@ class PubServer(BaseHTTPRequestHandler):
def _getNewswireFeed(self, authorized: bool,
callingDomain: str, path: str,
base_dir: str, http_prefix: str,
domain: str, port: int, proxyType: str,
domain: str, port: int, proxy_type: str,
GETstartTime,
debug: bool) -> None:
"""Returns the newswire feed
@ -6982,7 +6982,7 @@ class PubServer(BaseHTTPRequestHandler):
def _getHashtagCategoriesFeed(self, authorized: bool,
callingDomain: str, path: str,
base_dir: str, http_prefix: str,
domain: str, port: int, proxyType: str,
domain: str, port: int, proxy_type: str,
GETstartTime,
debug: bool) -> None:
"""Returns the hashtag categories feed
@ -7014,7 +7014,7 @@ class PubServer(BaseHTTPRequestHandler):
def _getRSS3feed(self, authorized: bool,
callingDomain: str, path: str,
base_dir: str, http_prefix: str,
domain: str, port: int, proxyType: str,
domain: str, port: int, proxy_type: str,
GETstartTime,
debug: bool, systemLanguage: str) -> None:
"""Returns an RSS3 feed
@ -7635,7 +7635,7 @@ class PubServer(BaseHTTPRequestHandler):
def _announceButton(self, callingDomain: str, path: str,
base_dir: str,
cookie: str, proxyType: str,
cookie: str, proxy_type: str,
http_prefix: str,
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
@ -7784,7 +7784,7 @@ class PubServer(BaseHTTPRequestHandler):
def _undoAnnounceButton(self, callingDomain: str, path: str,
base_dir: str,
cookie: str, proxyType: str,
cookie: str, proxy_type: str,
http_prefix: str,
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
@ -7889,7 +7889,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, debug: bool) -> None:
proxy_type: str, debug: bool) -> None:
"""Follow approve button was pressed
"""
originPathStr = path.split('/followapprove=')[0]
@ -7937,7 +7937,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, debug: bool,
proxy_type: str, debug: bool,
newswire: {}):
"""Vote for a newswire item
"""
@ -7993,7 +7993,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, debug: bool,
proxy_type: str, debug: bool,
newswire: {}):
"""Remove vote for a newswire item
"""
@ -8047,7 +8047,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, debug: bool) -> None:
proxy_type: str, debug: bool) -> None:
"""Follow deny button was pressed
"""
originPathStr = path.split('/followdeny=')[0]
@ -8091,7 +8091,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Press the like button
"""
@ -8256,7 +8256,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""A button is pressed to undo
"""
@ -8406,7 +8406,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Press an emoji reaction button
Note that this is not the emoji reaction selection icon at the
@ -8592,7 +8592,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""A button is pressed to undo emoji reaction
"""
@ -8760,7 +8760,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Press the emoji reaction picker icon at the bottom of the post
"""
@ -8853,7 +8853,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Bookmark button was pressed
"""
@ -8980,7 +8980,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Button pressed to undo a bookmark
"""
@ -9107,7 +9107,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> None:
"""Delete button is pressed on a post
"""
@ -9206,7 +9206,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str):
"""Mute button is pressed
"""
@ -9315,7 +9315,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str):
"""Undo mute button is pressed
"""
@ -9423,7 +9423,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the replies to a post
"""
@ -9645,7 +9645,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Show roles within profile screen
"""
@ -9755,7 +9755,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Show skills on the profile screen
"""
@ -9880,7 +9880,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""get an individual post from the path /@nickname/statusnumber
"""
@ -9936,7 +9936,7 @@ class PubServer(BaseHTTPRequestHandler):
domain, domainFull, port,
onion_domain, i2p_domain,
GETstartTime,
proxyType, cookie, debug,
proxy_type, cookie, debug,
includeCreateWrapper)
fitnessPerformance(GETstartTime, self.server.fitness,
'_GET', '_showIndividualAtPost',
@ -9951,7 +9951,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str, includeCreateWrapper: bool) -> bool:
"""Shows an individual post from its filename
"""
@ -10044,7 +10044,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows an individual post
"""
@ -10094,7 +10094,7 @@ class PubServer(BaseHTTPRequestHandler):
domain, domainFull, port,
onion_domain, i2p_domain,
GETstartTime,
proxyType, cookie, debug,
proxy_type, cookie, debug,
includeCreateWrapper)
fitnessPerformance(GETstartTime, self.server.fitness,
'_GET', '_showIndividualPost',
@ -10107,7 +10107,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows an individual post from an account which you are following
and where you have the notify checkbox set on person options
@ -10138,7 +10138,7 @@ class PubServer(BaseHTTPRequestHandler):
domain, domainFull, port,
onion_domain, i2p_domain,
GETstartTime,
proxyType, cookie, debug,
proxy_type, cookie, debug,
includeCreateWrapper)
fitnessPerformance(GETstartTime, self.server.fitness,
'_GET', '_showNotifyPost',
@ -10151,7 +10151,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str,
recentPostsCache: {}, session,
defaultTimeline: str,
@ -10320,7 +10320,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the DMs timeline
"""
@ -10465,7 +10465,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the replies timeline
"""
@ -10610,7 +10610,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the media timeline
"""
@ -10752,7 +10752,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the blogs timeline
"""
@ -10895,7 +10895,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the news timeline
"""
@ -11046,7 +11046,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the features timeline (all local blogs)
"""
@ -11197,7 +11197,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the shares timeline
"""
@ -11283,7 +11283,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the wanted timeline
"""
@ -11368,7 +11368,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the bookmarks timeline
"""
@ -11514,7 +11514,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the outbox timeline
"""
@ -11641,7 +11641,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the moderation timeline
"""
@ -11784,7 +11784,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str, sharesFileType: str) -> bool:
"""Shows the shares feed
"""
@ -11900,7 +11900,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the following feed
"""
@ -12019,7 +12019,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the followers feed
"""
@ -12181,7 +12181,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str) -> bool:
"""Shows the profile for a person
"""
@ -12278,7 +12278,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
debug: str,
enable_shared_inbox: bool) -> bool:
"""Shows the instance actor
@ -12355,7 +12355,7 @@ class PubServer(BaseHTTPRequestHandler):
domain: str, domainFull: str, port: int,
onion_domain: str, i2p_domain: str,
GETstartTime,
proxyType: str, cookie: str,
proxy_type: str, cookie: str,
translate: {}, debug: str) -> bool:
"""Shows a blog page
"""
@ -13424,7 +13424,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
None, self.server.debug,
self.server.enable_shared_inbox):
return
@ -13805,7 +13805,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain,
self.server.port,
self.server.proxyType,
self.server.proxy_type,
GETstartTime,
self.server.debug)
return
@ -13817,7 +13817,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain,
self.server.port,
self.server.proxyType,
self.server.proxy_type,
GETstartTime,
self.server.debug)
return
@ -13832,7 +13832,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain,
self.server.port,
self.server.proxyType,
self.server.proxy_type,
GETstartTime,
self.server.debug)
else:
@ -13842,7 +13842,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domainFull,
self.server.port,
self.server.proxyType,
self.server.proxy_type,
self.server.translate,
GETstartTime,
self.server.debug)
@ -13861,7 +13861,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
self.server.domain,
self.server.port,
self.server.proxyType,
self.server.proxy_type,
GETstartTime,
self.server.debug,
self.server.systemLanguage)
@ -14095,7 +14095,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.translate,
self.server.debug):
return
@ -15243,7 +15243,7 @@ class PubServer(BaseHTTPRequestHandler):
if authorized and htmlGET and '?repeat=' in self.path:
self._announceButton(callingDomain, self.path,
self.server.base_dir,
cookie, self.server.proxyType,
cookie, self.server.proxy_type,
self.server.http_prefix,
self.server.domain,
self.server.domainFull,
@ -15267,7 +15267,7 @@ class PubServer(BaseHTTPRequestHandler):
if authorized and htmlGET and '?unrepeat=' in self.path:
self._undoAnnounceButton(callingDomain, self.path,
self.server.base_dir,
cookie, self.server.proxyType,
cookie, self.server.proxy_type,
self.server.http_prefix,
self.server.domain,
self.server.domainFull,
@ -15298,7 +15298,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
self.server.debug,
self.server.newswire)
self.server.GETbusy = False
@ -15317,7 +15317,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
self.server.debug,
self.server.newswire)
self.server.GETbusy = False
@ -15336,7 +15336,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
self.server.debug)
self.server.GETbusy = False
return
@ -15358,7 +15358,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
self.server.debug)
self.server.GETbusy = False
return
@ -15377,7 +15377,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie,
self.server.debug)
self.server.GETbusy = False
@ -15397,7 +15397,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug)
self.server.GETbusy = False
return
@ -15418,7 +15418,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie,
self.server.debug)
self.server.GETbusy = False
@ -15440,7 +15440,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug)
self.server.GETbusy = False
return
@ -15460,7 +15460,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug)
self.server.GETbusy = False
return
@ -15480,7 +15480,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug)
self.server.GETbusy = False
return
@ -15500,7 +15500,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType, cookie,
self.server.proxy_type, cookie,
self.server.debug)
self.server.GETbusy = False
return
@ -15520,7 +15520,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType, cookie,
self.server.proxy_type, cookie,
self.server.debug)
self.server.GETbusy = False
return
@ -15540,7 +15540,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType, cookie,
self.server.proxy_type, cookie,
self.server.debug)
self.server.GETbusy = False
return
@ -15560,7 +15560,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType, cookie,
self.server.proxy_type, cookie,
self.server.debug)
self.server.GETbusy = False
return
@ -15787,7 +15787,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15808,7 +15808,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType, cookie,
self.server.proxy_type, cookie,
self.server.debug):
self.server.GETbusy = False
return
@ -15829,7 +15829,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15850,7 +15850,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15870,7 +15870,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15888,7 +15888,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15909,7 +15909,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug,
self.server.recentPostsCache,
self.server.session,
@ -15941,7 +15941,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15962,7 +15962,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -15983,7 +15983,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16004,7 +16004,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16025,7 +16025,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16043,7 +16043,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16064,7 +16064,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16081,7 +16081,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16181,7 +16181,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16203,7 +16203,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16225,7 +16225,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16244,7 +16244,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug, 'shares'):
self.server.GETbusy = False
return
@ -16263,7 +16263,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16282,7 +16282,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -16302,7 +16302,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onion_domain,
self.server.i2p_domain,
GETstartTime,
self.server.proxyType,
self.server.proxy_type,
cookie, self.server.debug):
self.server.GETbusy = False
return
@ -18476,7 +18476,7 @@ def runDaemon(content_license_url: str,
fed_list: [] = [],
max_mentions: int = 10, max_emoji: int = 10,
secure_mode: bool = False,
proxyType: str = None, maxReplies: int = 64,
proxy_type: str = None, maxReplies: int = 64,
domainMaxPostsPerDay: int = 8640,
accountMaxPostsPerDay: int = 864,
allowDeletion: bool = False,
@ -18740,7 +18740,7 @@ def runDaemon(content_license_url: str,
httpd.personCache = {}
httpd.cachedWebfingers = {}
httpd.faviconsCache = {}
httpd.proxyType = proxyType
httpd.proxy_type = proxy_type
httpd.session = None
httpd.sessionLastUpdate = 0
httpd.lastGET = 0
@ -18925,7 +18925,7 @@ def runDaemon(content_license_url: str,
httpd.postLog, httpd.cachedWebfingers,
httpd.personCache, httpd.inboxQueue,
domain, onion_domain, i2p_domain,
port, proxyType,
port, proxy_type,
httpd.federationList,
maxReplies,
domainMaxPostsPerDay,
@ -18964,7 +18964,7 @@ def runDaemon(content_license_url: str,
threadWithTrace(target=runFederatedSharesDaemon,
args=(base_dir, httpd,
http_prefix, httpd.domainFull,
proxyType, debug,
proxy_type, debug,
httpd.systemLanguage), daemon=True)
# flags used when restarting the inbox queue

View File

@ -1312,7 +1312,7 @@ def _desktopShowFollowing(followingJson: {}, translate: {},
handleNickname + '@' + handleDomainFull)
def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
nickname: str, domain: str, port: int,
password: str, screenreader: str,
systemLanguage: str,
@ -1400,7 +1400,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
sayStr = indent + 'Connecting...'
_sayCommand(sayStr, sayStr, screenreader,
systemLanguage, espeak)
session = createSession(proxyType)
session = createSession(proxy_type)
sayStr = indent + '/q or /quit to exit'
_sayCommand(sayStr, sayStr, screenreader,
@ -1498,7 +1498,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
desktopShown = True
prevTimelineFirstId = timelineFirstId
else:
session = createSession(proxyType)
session = createSession(proxy_type)
if not desktopShown:
if not session:
print('No session\n')
@ -1506,7 +1506,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_desktopClearScreen()
_desktopShowBanner()
print('No posts\n')
if proxyType == 'tor':
if proxy_type == 'tor':
print('You may need to run the desktop client ' +
'with the --http option')
@ -1721,7 +1721,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
if postJsonObject['object'].get('conversation'):
conversationId = \
postJsonObject['object']['conversation']
sessionReply = createSession(proxyType)
sessionReply = createSession(proxy_type)
_desktopReplyToPost(sessionReply, postId,
base_dir, nickname, password,
domain, port, http_prefix,
@ -1740,7 +1740,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
commandStr.startswith('direct message ') or
commandStr.startswith('post ') or
commandStr.startswith('send ')):
sessionPost = createSession(proxyType)
sessionPost = createSession(proxy_type)
if commandStr.startswith('dm ') or \
commandStr.startswith('direct message ') or \
commandStr.startswith('post ') or \
@ -1799,7 +1799,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionLike = createSession(proxyType)
sessionLike = createSession(proxy_type)
sendLikeViaServer(base_dir, sessionLike,
nickname, password,
domain, port, http_prefix,
@ -1838,7 +1838,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionMute = createSession(proxyType)
sessionMute = createSession(proxy_type)
sendUndoMuteViaServer(base_dir, sessionMute,
nickname, password,
domain, port,
@ -1870,7 +1870,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionMute = createSession(proxyType)
sessionMute = createSession(proxy_type)
sendMuteViaServer(base_dir, sessionMute,
nickname, password,
domain, port,
@ -1911,7 +1911,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionbm = createSession(proxyType)
sessionbm = createSession(proxy_type)
sendUndoBookmarkViaServer(base_dir, sessionbm,
nickname, password,
domain, port, http_prefix,
@ -1942,7 +1942,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionbm = createSession(proxyType)
sessionbm = createSession(proxy_type)
sendBookmarkViaServer(base_dir, sessionbm,
nickname, password,
domain, port, http_prefix,
@ -1976,7 +1976,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionBlock = createSession(proxyType)
sessionBlock = createSession(proxy_type)
sendUndoBlockViaServer(base_dir, sessionBlock,
nickname, password,
domain, port,
@ -2022,7 +2022,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionBlock = createSession(proxyType)
sessionBlock = createSession(proxy_type)
sendBlockViaServer(base_dir, sessionBlock,
nickname, password,
domain, port,
@ -2052,7 +2052,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionUnlike = createSession(proxyType)
sessionUnlike = createSession(proxy_type)
sendUndoLikeViaServer(base_dir, sessionUnlike,
nickname, password,
domain, port, http_prefix,
@ -2083,7 +2083,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionAnnounce = createSession(proxyType)
sessionAnnounce = createSession(proxy_type)
sendAnnounceViaServer(base_dir, sessionAnnounce,
nickname, password,
domain, port,
@ -2116,7 +2116,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionAnnounce = createSession(proxyType)
sessionAnnounce = createSession(proxy_type)
sendUndoAnnounceViaServer(base_dir, sessionAnnounce,
postJsonObject,
nickname, password,
@ -2211,7 +2211,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
followNickname + '@' + followDomain
_sayCommand(sayStr, sayStr,
screenreader, systemLanguage, espeak)
sessionFollow = createSession(proxyType)
sessionFollow = createSession(proxy_type)
sendFollowRequestViaServer(base_dir,
sessionFollow,
nickname, password,
@ -2247,7 +2247,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
followNickname + '@' + followDomain
_sayCommand(sayStr, sayStr,
screenreader, systemLanguage, espeak)
sessionUnfollow = createSession(proxyType)
sessionUnfollow = createSession(proxy_type)
sendUnfollowRequestViaServer(base_dir, sessionUnfollow,
nickname, password,
domain, port,
@ -2278,7 +2278,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
approveNickname + '@' + approveDomain
_sayCommand(sayStr, sayStr,
screenreader, systemLanguage, espeak)
sessionApprove = createSession(proxyType)
sessionApprove = createSession(proxy_type)
approveFollowRequestViaServer(base_dir, sessionApprove,
nickname, password,
domain, port,
@ -2311,7 +2311,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
denyNickname + '@' + denyDomain
_sayCommand(sayStr, sayStr,
screenreader, systemLanguage, espeak)
sessionDeny = createSession(proxyType)
sessionDeny = createSession(proxy_type)
denyFollowRequestViaServer(base_dir, sessionDeny,
nickname, password,
domain, port,
@ -2484,7 +2484,7 @@ def runDesktopClient(base_dir: str, proxyType: str, http_prefix: str,
_sayCommand(sayStr, sayStr,
screenreader,
systemLanguage, espeak)
sessionrm = createSession(proxyType)
sessionrm = createSession(proxy_type)
sendDeleteViaServer(base_dir, sessionrm,
nickname, password,
domain, port,

View File

@ -712,22 +712,22 @@ if args.posts:
args.port = 443
nickname = args.posts.split('@')[0]
domain = args.posts.split('@')[1]
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
if not args.language:
args.language = 'en'
signingPrivateKeyPem = getInstanceActorKey(base_dir, originDomain)
getPublicPostsOfPerson(base_dir, nickname, domain, False, True,
proxyType, args.port, http_prefix, debug,
proxy_type, args.port, http_prefix, debug,
__version__, args.language,
signingPrivateKeyPem, originDomain)
sys.exit()
@ -746,17 +746,17 @@ if args.postDomains:
args.port = 443
nickname = args.postDomains.split('@')[0]
domain = args.postDomains.split('@')[1]
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
wordFrequency = {}
domainList = []
if not args.language:
@ -771,7 +771,7 @@ if args.postDomains:
domainList = getPublicPostDomains(None,
base_dir, nickname, domain,
originDomain,
proxyType, args.port,
proxy_type, args.port,
http_prefix, debug,
__version__,
wordFrequency, domainList,
@ -798,17 +798,17 @@ if args.postDomainsBlocked:
args.port = 443
nickname = args.postDomainsBlocked.split('@')[0]
domain = args.postDomainsBlocked.split('@')[1]
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
wordFrequency = {}
domainList = []
if not args.language:
@ -818,7 +818,7 @@ if args.postDomainsBlocked:
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
domainList = getPublicPostDomainsBlocked(None,
base_dir, nickname, domain,
proxyType, args.port,
proxy_type, args.port,
http_prefix, debug,
__version__,
wordFrequency, domainList,
@ -844,17 +844,17 @@ if args.checkDomains:
args.port = 443
nickname = args.checkDomains.split('@')[0]
domain = args.checkDomains.split('@')[1]
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
maxBlockedDomains = 0
if not args.language:
args.language = 'en'
@ -863,7 +863,7 @@ if args.checkDomains:
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
checkDomains(None,
base_dir, nickname, domain,
proxyType, args.port,
proxy_type, args.port,
http_prefix, debug,
__version__,
maxBlockedDomains, False, args.language,
@ -878,7 +878,7 @@ if args.socnet:
if not args.http:
args.port = 443
proxyType = 'tor'
proxy_type = 'tor'
if not args.language:
args.language = 'en'
if not args.domain:
@ -890,7 +890,7 @@ if args.socnet:
if args.secure_mode:
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
dotGraph = instancesGraph(base_dir, args.socnet,
proxyType, args.port,
proxy_type, args.port,
http_prefix, debug,
__version__, args.language,
signingPrivateKeyPem)
@ -916,18 +916,18 @@ if args.postsraw:
args.port = 443
nickname = args.postsraw.split('@')[0]
domain = args.postsraw.split('@')[1]
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
if not args.language:
args.language = 'en'
signingPrivateKeyPem = getInstanceActorKey(base_dir, originDomain)
getPublicPostsOfPerson(base_dir, nickname, domain, False, False,
proxyType, args.port, http_prefix, debug,
proxy_type, args.port, http_prefix, debug,
__version__, args.language,
signingPrivateKeyPem, originDomain)
sys.exit()
@ -1166,13 +1166,13 @@ else:
if configFederationList:
federationList = configFederationList
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
if args.approve:
if not args.nickname:
@ -1181,7 +1181,7 @@ if args.approve:
if '@' not in args.approve:
print('syntax: --approve nick@domain')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
sendThreads = []
postLog = []
cachedWebfingers = {}
@ -1209,7 +1209,7 @@ if args.deny:
if '@' not in args.deny:
print('syntax: --deny nick@domain')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
sendThreads = []
postLog = []
cachedWebfingers = {}
@ -1260,7 +1260,7 @@ if args.message:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
if not args.sendto:
print('Specify an account to sent to: --sendto [nickname@domain]')
sys.exit()
@ -1342,7 +1342,7 @@ if args.announce:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1378,24 +1378,24 @@ if args.box:
sys.exit()
args.password = args.password.replace('\n', '')
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
if not domain:
domain = getConfigParam(base_dir, 'domain')
signingPrivateKeyPem = None
if args.secure_mode:
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
session = createSession(proxyType)
session = createSession(proxy_type)
boxJson = c2sBoxJson(base_dir, session,
args.nickname, args.password,
domain, port, http_prefix,
@ -1447,7 +1447,7 @@ if args.itemName:
'with the --duration option')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1490,7 +1490,7 @@ if args.undoItemName:
print('Specify a nickname with the --nickname option')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1552,7 +1552,7 @@ if args.wantedItemName:
'with the --duration option')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1595,7 +1595,7 @@ if args.undoWantedItemName:
print('Specify a nickname with the --nickname option')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1629,7 +1629,7 @@ if args.like:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1668,7 +1668,7 @@ if args.react:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1701,7 +1701,7 @@ if args.undolike:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1741,7 +1741,7 @@ if args.undoreact:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1775,7 +1775,7 @@ if args.bookmark:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1809,7 +1809,7 @@ if args.unbookmark:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1842,7 +1842,7 @@ if args.delete:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -1884,7 +1884,7 @@ if args.follow:
sys.exit()
followDomain, followPort = getDomainFromActor(args.follow)
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
followHttpPrefix = http_prefix
@ -1930,7 +1930,7 @@ if args.unfollow:
sys.exit()
followDomain, followPort = getDomainFromActor(args.unfollow)
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
followHttpPrefix = http_prefix
@ -1967,7 +1967,7 @@ if args.followingList:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
followHttpPrefix = http_prefix
@ -2000,7 +2000,7 @@ if args.followersList:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
followHttpPrefix = http_prefix
@ -2034,7 +2034,7 @@ if args.followRequestsList:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
followHttpPrefix = http_prefix
@ -2077,19 +2077,19 @@ if args.migrations:
if args.http or domain.endswith('.onion'):
http_prefix = 'http'
port = 80
proxyType = 'tor'
proxy_type = 'tor'
elif domain.endswith('.i2p'):
http_prefix = 'http'
port = 80
proxyType = 'i2p'
proxy_type = 'i2p'
elif args.gnunet:
http_prefix = 'gnunet'
port = 80
proxyType = 'gnunet'
proxy_type = 'gnunet'
else:
http_prefix = 'https'
port = 443
session = createSession(proxyType)
session = createSession(proxy_type)
if not domain:
domain = getConfigParam(base_dir, 'domain')
signingPrivateKeyPem = None
@ -2174,19 +2174,19 @@ if args.followers:
if args.http or domain.endswith('.onion'):
http_prefix = 'http'
port = 80
proxyType = 'tor'
proxy_type = 'tor'
elif domain.endswith('.i2p'):
http_prefix = 'http'
port = 80
proxyType = 'i2p'
proxy_type = 'i2p'
elif args.gnunet:
http_prefix = 'gnunet'
port = 80
proxyType = 'gnunet'
proxy_type = 'gnunet'
else:
http_prefix = 'https'
port = 443
session = createSession(proxyType)
session = createSession(proxy_type)
if nickname == 'inbox':
nickname = domain
@ -2495,7 +2495,7 @@ if args.skill:
print('Skill level should be a percentage in the range 0-100')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -2530,7 +2530,7 @@ if args.availability:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -2574,22 +2574,22 @@ if args.desktop:
args.password = args.password.replace('\n', '')
proxyType = None
proxy_type = None
if args.tor or domain.endswith('.onion'):
proxyType = 'tor'
proxy_type = 'tor'
if domain.endswith('.onion'):
args.port = 80
elif args.i2p or domain.endswith('.i2p'):
proxyType = 'i2p'
proxy_type = 'i2p'
if domain.endswith('.i2p'):
args.port = 80
elif args.gnunet:
proxyType = 'gnunet'
proxy_type = 'gnunet'
# only store inbox posts if we are not running as a daemon
storeInboxPosts = not args.noKeyPress
runDesktopClient(base_dir, proxyType, http_prefix,
runDesktopClient(base_dir, proxy_type, http_prefix,
nickname, domain, port, args.password,
args.screenreader, args.language,
args.notificationSounds,
@ -2644,7 +2644,7 @@ if args.block:
print(args.block + ' does not look like an actor url')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -2676,7 +2676,7 @@ if args.mute:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -2708,7 +2708,7 @@ if args.unmute:
sys.exit()
args.password = args.password.replace('\n', '')
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -2752,7 +2752,7 @@ if args.unblock:
print(args.unblock + ' does not look like an actor url')
sys.exit()
session = createSession(proxyType)
session = createSession(proxy_type)
personCache = {}
cachedWebfingers = {}
if not domain:
@ -3253,7 +3253,7 @@ if __name__ == "__main__":
port, proxy_port, http_prefix,
federationList, args.max_mentions,
args.max_emoji, args.secure_mode,
proxyType, args.maxReplies,
proxy_type, args.maxReplies,
args.domainMaxPostsPerDay,
args.accountMaxPostsPerDay,
args.allowdeletion, debug, False,

View File

@ -3182,7 +3182,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
postLog: [], cachedWebfingers: {}, personCache: {},
queue: [], domain: str,
onion_domain: str, i2p_domain: str,
port: int, proxyType: str,
port: int, proxy_type: str,
federationList: [], debug: bool,
queueFilename: str, destinationFilename: str,
maxReplies: int, allowDeletion: bool,
@ -4066,7 +4066,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
cachedWebfingers: {}, personCache: {}, queue: [],
domain: str,
onion_domain: str, i2p_domain: str,
port: int, proxyType: str,
port: int, proxy_type: str,
federationList: [], maxReplies: int,
domainMaxPostsPerDay: int,
accountMaxPostsPerDay: int,
@ -4089,7 +4089,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
currSessionTime = int(time.time())
sessionLastUpdate = currSessionTime
print('Starting new session when starting inbox queue')
session = createSession(proxyType)
session = createSession(proxy_type)
inboxHandle = 'inbox@' + domain
if debug:
print('DEBUG: Inbox queue running')
@ -4147,7 +4147,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
# recreate the session periodically
if not session or currTime - sessionLastUpdate > 21600:
print('Regenerating inbox queue session at 6hr interval')
session = createSession(proxyType)
session = createSession(proxy_type)
if not session:
continue
sessionLastUpdate = currTime
@ -4496,7 +4496,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
personCache, queue,
domain,
onion_domain, i2p_domain,
port, proxyType,
port, proxy_type,
federationList,
debug,
queueFilename, destination,

View File

@ -784,7 +784,7 @@ def runNewswireDaemon(base_dir: str, httpd,
# has the session been created yet?
if not httpd.session:
print('Newswire daemon waiting for session')
httpd.session = createSession(httpd.proxyType)
httpd.session = createSession(httpd.proxy_type)
if not httpd.session:
print('Newswire daemon has no session')
time.sleep(60)

View File

@ -186,7 +186,7 @@ def postMessageToOutbox(session, translate: {},
federationList: [], sendThreads: [],
postLog: [], cachedWebfingers: {},
personCache: {}, allowDeletion: bool,
proxyType: str, version: str, debug: bool,
proxy_type: str, version: str, debug: bool,
yt_replace_domain: str,
twitter_replacement_domain: str,
show_published_date_only: bool,
@ -484,7 +484,7 @@ def postMessageToOutbox(session, translate: {},
'for the post associated with the Announce activity')
if not server.session:
print('DEBUG: creating new session for c2s')
server.session = createSession(proxyType)
server.session = createSession(proxy_type)
if not server.session:
print('ERROR: Failed to create session for postMessageToOutbox')
return False

View File

@ -1496,16 +1496,16 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
domain = domain.replace('\n', '').replace('\r', '')
cachedWebfingers = {}
proxyType = None
proxy_type = None
if http or domain.endswith('.onion'):
http_prefix = 'http'
proxyType = 'tor'
proxy_type = 'tor'
elif domain.endswith('.i2p'):
http_prefix = 'http'
proxyType = 'i2p'
proxy_type = 'i2p'
elif gnunet:
http_prefix = 'gnunet'
proxyType = 'gnunet'
proxy_type = 'gnunet'
else:
if '127.0.' not in domain and '192.168.' not in domain:
http_prefix = 'https'
@ -1514,7 +1514,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
if existingSession:
session = existingSession
else:
session = createSession(proxyType)
session = createSession(proxy_type)
if nickname == 'inbox':
nickname = domain

View File

@ -4055,7 +4055,7 @@ def archivePostsForPerson(http_prefix: str, nickname: str, domain: str,
def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
raw: bool, simple: bool, proxyType: str,
raw: bool, simple: bool, proxy_type: str,
port: int, http_prefix: str,
debug: bool, project_version: str,
systemLanguage: str,
@ -4070,7 +4070,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
print('Signing key missing')
print('Starting new session for getting public posts')
session = createSession(proxyType)
session = createSession(proxy_type)
if not session:
if debug:
print('Session was not created')
@ -4125,7 +4125,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
originDomain: str,
proxyType: str, port: int, http_prefix: str,
proxy_type: str, port: int, http_prefix: str,
debug: bool, project_version: str,
wordFrequency: {}, domainList: [],
systemLanguage: str,
@ -4133,7 +4133,7 @@ def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
""" Returns a list of domains referenced within public posts
"""
if not session:
session = createSession(proxyType)
session = createSession(proxy_type)
if not session:
return domainList
personCache = {}
@ -4222,14 +4222,14 @@ def downloadFollowCollection(signingPrivateKeyPem: str,
def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
originDomain: str,
proxyType: str, port: int, http_prefix: str,
proxy_type: str, port: int, http_prefix: str,
debug: bool, project_version: str,
wordFrequency: {}, systemLanguage: str,
signingPrivateKeyPem: str) -> []:
""" Returns a dict of domains referenced within public posts
"""
if not session:
session = createSession(proxyType)
session = createSession(proxy_type)
if not session:
return {}
personCache = {}
@ -4290,7 +4290,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
def getPublicPostDomainsBlocked(session, base_dir: str,
nickname: str, domain: str,
proxyType: str, port: int, http_prefix: str,
proxy_type: str, port: int, http_prefix: str,
debug: bool, project_version: str,
wordFrequency: {}, domainList: [],
systemLanguage: str,
@ -4302,7 +4302,7 @@ def getPublicPostDomainsBlocked(session, base_dir: str,
postDomains = \
getPublicPostDomains(session, base_dir, nickname, domain,
originDomain,
proxyType, port, http_prefix,
proxy_type, port, http_prefix,
debug, project_version,
wordFrequency, domainList, systemLanguage,
signingPrivateKeyPem)
@ -4351,7 +4351,7 @@ def _getNonMutualsOfPerson(base_dir: str,
def checkDomains(session, base_dir: str,
nickname: str, domain: str,
proxyType: str, port: int, http_prefix: str,
proxy_type: str, port: int, http_prefix: str,
debug: bool, project_version: str,
maxBlockedDomains: int, singleCheck: bool,
systemLanguage: str,
@ -4381,7 +4381,7 @@ def checkDomains(session, base_dir: str,
getPublicPostDomainsBlocked(session, base_dir,
nonMutualNickname,
nonMutualDomain,
proxyType, port, http_prefix,
proxy_type, port, http_prefix,
debug, project_version,
wordFrequency, [],
systemLanguage,
@ -4403,7 +4403,7 @@ def checkDomains(session, base_dir: str,
getPublicPostDomainsBlocked(session, base_dir,
nonMutualNickname,
nonMutualDomain,
proxyType, port, http_prefix,
proxy_type, port, http_prefix,
debug, project_version,
wordFrequency, [],
systemLanguage,

View File

@ -111,7 +111,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
httpd.cachedWebfingers,
httpd.personCache,
httpd.allowDeletion,
httpd.proxyType,
httpd.proxy_type,
httpd.project_version,
httpd.debug,
httpd.yt_replace_domain,

View File

@ -20,7 +20,7 @@ from http.client import HTTPConnection
base_directory = None
def createSession(proxyType: str):
def createSession(proxy_type: str):
session = None
try:
session = requests.session()
@ -38,19 +38,19 @@ def createSession(proxyType: str):
return None
if not session:
return None
if proxyType == 'tor':
if proxy_type == 'tor':
session.proxies = {}
session.proxies['http'] = 'socks5h://localhost:9050'
session.proxies['https'] = 'socks5h://localhost:9050'
elif proxyType == 'i2p':
elif proxy_type == 'i2p':
session.proxies = {}
session.proxies['http'] = 'socks5h://localhost:4447'
session.proxies['https'] = 'socks5h://localhost:4447'
elif proxyType == 'gnunet':
elif proxy_type == 'gnunet':
session.proxies = {}
session.proxies['http'] = 'socks5h://localhost:7777'
session.proxies['https'] = 'socks5h://localhost:7777'
# print('New session created with proxy ' + str(proxyType))
# print('New session created with proxy ' + str(proxy_type))
return session

View File

@ -1698,7 +1698,7 @@ def _regenerateSharesToken(base_dir: str, domainFull: str,
def runFederatedSharesDaemon(base_dir: str, httpd, http_prefix: str,
domainFull: str, proxyType: str, debug: bool,
domainFull: str, proxy_type: str, debug: bool,
systemLanguage: str) -> None:
"""Runs the daemon used to update federated shared items
"""
@ -1741,7 +1741,7 @@ def runFederatedSharesDaemon(base_dir: str, httpd, http_prefix: str,
time.sleep(fileCheckIntervalSec)
continue
session = createSession(proxyType)
session = createSession(proxy_type)
for sharesFileType in getSharesFilesList():
_updateFederatedSharesCache(session,
shared_items_federated_domains,

View File

@ -15,7 +15,7 @@ from utils import getFullDomain
def instancesGraph(base_dir: str, handles: str,
proxyType: str,
proxy_type: str,
port: int, http_prefix: str,
debug: bool, project_version: str,
systemLanguage: str, signingPrivateKeyPem: str) -> str:
@ -27,7 +27,7 @@ def instancesGraph(base_dir: str, handles: str,
dotGraphStr = 'digraph instances {\n'
if ',' not in handles:
return dotGraphStr + '}\n'
session = createSession(proxyType)
session = createSession(proxy_type)
if not session:
return dotGraphStr + '}\n'

View File

@ -691,7 +691,7 @@ def createServerAlice(path: str, domain: str, port: int,
systemLanguage = 'en'
nickname = 'alice'
http_prefix = 'http'
proxyType = None
proxy_type = None
password = 'alicepass'
maxReplies = 64
domainMaxPostsPerDay = 1000
@ -816,7 +816,7 @@ def createServerAlice(path: str, domain: str, port: int,
"instance_id", False, path, domain,
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federationList, max_mentions, max_emoji, False,
proxyType, maxReplies,
proxy_type, maxReplies,
domainMaxPostsPerDay, accountMaxPostsPerDay,
allowDeletion, True, True, False, sendThreads,
False)
@ -835,7 +835,7 @@ def createServerBob(path: str, domain: str, port: int,
systemLanguage = 'en'
nickname = 'bob'
http_prefix = 'http'
proxyType = None
proxy_type = None
client_to_server = False
password = 'bobpass'
maxReplies = 64
@ -958,7 +958,7 @@ def createServerBob(path: str, domain: str, port: int,
"instance_id", False, path, domain,
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federationList, max_mentions, max_emoji, False,
proxyType, maxReplies,
proxy_type, maxReplies,
domainMaxPostsPerDay, accountMaxPostsPerDay,
allowDeletion, True, True, False, sendThreads,
False)
@ -975,7 +975,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
shared_items_federated_domains = []
nickname = 'eve'
http_prefix = 'http'
proxyType = None
proxy_type = None
password = 'evepass'
maxReplies = 64
allowDeletion = True
@ -1028,7 +1028,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
"instance_id", False, path, domain,
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federationList, max_mentions, max_emoji, False,
proxyType, maxReplies, allowDeletion, True, True, False,
proxy_type, maxReplies, allowDeletion, True, True, False,
sendThreads, False)
@ -1045,7 +1045,7 @@ def createServerGroup(path: str, domain: str, port: int,
# systemLanguage = 'en'
nickname = 'testgroup'
http_prefix = 'http'
proxyType = None
proxy_type = None
password = 'testgrouppass'
maxReplies = 64
domainMaxPostsPerDay = 1000
@ -1100,7 +1100,7 @@ def createServerGroup(path: str, domain: str, port: int,
"instance_id", False, path, domain,
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federationList, max_mentions, max_emoji, False,
proxyType, maxReplies,
proxy_type, maxReplies,
domainMaxPostsPerDay, accountMaxPostsPerDay,
allowDeletion, True, True, False, sendThreads,
False)
@ -1116,7 +1116,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
systemLanguage = 'en'
http_prefix = 'http'
proxyType = None
proxy_type = None
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
if os.path.isdir(base_dir + '/.tests'):
@ -1179,7 +1179,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
print('\n\n*******************************************************')
print('Alice sends to Bob')
os.chdir(aliceDir)
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
inReplyTo = None
inReplyToAtomUri = None
subject = None
@ -1313,7 +1313,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
followPerson(aliceDir, 'alice', aliceDomain, 'bob',
bobDomainStr, federationList, False, False)
sessionBob = createSession(proxyType)
sessionBob = createSession(proxy_type)
bobPostLog = []
bobPersonCache = {}
bobCachedWebfingers = {}
@ -1440,7 +1440,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
systemLanguage = 'en'
http_prefix = 'http'
proxyType = None
proxy_type = None
federationList = []
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
@ -1511,7 +1511,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
print('*********************************************************')
print('Alice sends a follow request to Bob')
os.chdir(aliceDir)
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
inReplyTo = None
inReplyToAtomUri = None
subject = None
@ -1629,7 +1629,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
systemLanguage = 'en'
http_prefix = 'http'
proxyType = None
proxy_type = None
federationList = []
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
@ -1699,7 +1699,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
time.sleep(1)
signingPrivateKeyPem = None
sessionClient = createSession(proxyType)
sessionClient = createSession(proxy_type)
# Get Bob's instance actor
print('\n\n*********************************************************')
@ -1729,7 +1729,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
print('*********************************************************')
print('Alice sends a follow request to Bob')
os.chdir(aliceDir)
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
inReplyTo = None
inReplyToAtomUri = None
subject = None
@ -1809,7 +1809,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
sharedItemPrice = "1.30"
sharedItemCurrency = "EUR"
signingPrivateKeyPem = None
sessionBob = createSession(proxyType)
sessionBob = createSession(proxy_type)
shareJson = \
sendShareViaServer(bobDir, sessionBob,
'bob', bobPassword,
@ -2035,7 +2035,7 @@ def testGroupFollow(base_dir: str) -> None:
# systemLanguage = 'en'
http_prefix = 'http'
proxyType = None
proxy_type = None
federationList = []
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
@ -2165,7 +2165,7 @@ def testGroupFollow(base_dir: str) -> None:
print('*********************************************************')
print('Alice sends a follow request to the test group')
os.chdir(aliceDir)
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
inReplyTo = None
inReplyToAtomUri = None
subject = None
@ -2242,7 +2242,7 @@ def testGroupFollow(base_dir: str) -> None:
print('*********************************************************')
print('Bob sends a follow request to the test group')
os.chdir(bobDir)
sessionBob = createSession(proxyType)
sessionBob = createSession(proxy_type)
inReplyTo = None
inReplyToAtomUri = None
subject = None
@ -2787,7 +2787,7 @@ def testClientToServer(base_dir: str):
systemLanguage = 'en'
http_prefix = 'http'
proxyType = None
proxy_type = None
federationList = []
low_bandwidth = False
@ -2856,7 +2856,7 @@ def testClientToServer(base_dir: str):
print('\n\n*******************************************************')
print('EVENT: Alice sends to Bob via c2s')
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
followersOnly = False
attachedImageFilename = base_dir + '/img/logo.png'
mediaType = getAttachmentMediaType(attachedImageFilename)
@ -3036,7 +3036,7 @@ def testClientToServer(base_dir: str):
assert 'alice@' + aliceDomain + ':' + str(alicePort) in \
open(bobDir + '/accounts/bob@' + bobDomain + '/following.txt').read()
sessionBob = createSession(proxyType)
sessionBob = createSession(proxy_type)
password = 'bobpass'
outboxPath = bobDir + '/accounts/bob@' + bobDomain + '/outbox'
inboxPath = aliceDir + '/accounts/alice@' + aliceDomain + '/inbox'
@ -5067,7 +5067,7 @@ def testUpdateActor(base_dir: str):
testServerAliceRunning = False
http_prefix = 'http'
proxyType = None
proxy_type = None
federationList = []
if os.path.isdir(base_dir + '/.tests'):
@ -5111,7 +5111,7 @@ def testUpdateActor(base_dir: str):
print('\n\n*******************************************************')
print('Alice updates her PGP key')
sessionAlice = createSession(proxyType)
sessionAlice = createSession(proxy_type)
cachedWebfingers = {}
personCache = {}
password = 'alicepass'

View File

@ -116,20 +116,20 @@ def htmlAccountInfo(cssCache: {}, translate: {},
infoForm += translate[msgStr1] + '</center><br><br>\n'
proxyType = 'tor'
proxy_type = 'tor'
if not os.path.isfile('/usr/bin/tor'):
proxyType = None
proxy_type = None
if domain.endswith('.i2p'):
proxyType = None
proxy_type = None
session = createSession(proxyType)
session = createSession(proxy_type)
wordFrequency = {}
originDomain = None
domainDict = getPublicPostInfo(session,
base_dir, searchNickname, searchDomain,
originDomain,
proxyType, searchPort,
proxy_type, searchPort,
http_prefix, debug,
__version__, wordFrequency, systemLanguage,
signingPrivateKeyPem)