MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / _loadTrustedPeer

Function _loadTrustedPeer

src/helper_startup.py:18–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16storeConfigFilesInSameDirectoryAsProgramByDefault = False # The user may de-select Portable Mode in the settings if they want the config files to stay in the application data folder.
17
18def _loadTrustedPeer():
19 try:
20 trustedPeer = BMConfigParser().get('bitmessagesettings', 'trustedpeer')
21 except ConfigParser.Error:
22 # This probably means the trusted peer wasn't specified so we
23 # can just leave it as None
24 return
25
26 host, port = trustedPeer.split(':')
27 state.trustedPeer = state.Peer(host, int(port))
28
29def loadConfig():
30 if state.appdata:

Callers 1

loadConfigFunction · 0.85

Calls 2

BMConfigParserClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected