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

Function configInit

src/bitmessagecli.py:67–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 return dataFolder
66
67def configInit():
68 BMConfigParser().add_section('bitmessagesettings')
69 BMConfigParser().set('bitmessagesettings', 'port', '8444') #Sets the bitmessage port to stop the warning about the api not properly being setup. This is in the event that the keys.dat is in a different directory or is created locally to connect to a machine remotely.
70 BMConfigParser().set('bitmessagesettings','apienabled','true') #Sets apienabled to true in keys.dat
71
72 with open(keysName, 'wb') as configfile:
73 BMConfigParser().write(configfile)
74
75 print '\n ' + str(keysName) + ' Initalized in the same directory as daemon.py'
76 print ' You will now need to configure the ' + str(keysName) + ' file.\n'
77
78def apiInit(apiEnabled):
79 global usrPrompt

Callers 1

apiDataFunction · 0.85

Calls 3

BMConfigParserClass · 0.90
setMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected