Skip to content

Commit c459a98

Browse files
author
Dmitry Surnin
committed
change config.baseDir to self.baseDir
1 parent b13c6a7 commit c459a98

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

plenum/cli/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ def newNode(self, nodeName: str):
943943
node = self.NodeClass(name,
944944
nodeRegistry=nodeRegistry,
945945
basedirpath=self.basedirpath,
946+
base_data_dir=self.basedirpath,
946947
pluginPaths=self.pluginPaths,
947948
config=self.config)
948949
except KeysNotFoundException as e:
@@ -1874,7 +1875,7 @@ def getNoEnvWalletsBaseDir(self):
18741875
os.path.join(self.getWalletsBaseDir(), NO_ENV))
18751876

18761877
def getWalletsBaseDir(self):
1877-
return os.path.expanduser(os.path.join(self.config.baseDir,
1878+
return os.path.expanduser(os.path.join(self.basedirpath,
18781879
self.config.walletsDir))
18791880

18801881
def getContextBasedWalletsBaseDir(self):
@@ -2041,7 +2042,7 @@ def printUsage(self, msgs):
20412042
# TODO: Do we keep this? What happens when we allow the CLI to connect
20422043
# to remote nodes?
20432044
def cleanUp(self):
2044-
dataPath = os.path.join(self.config.baseDir, "data")
2045+
dataPath = os.path.join(self.basedirpath, "data")
20452046
try:
20462047
shutil.rmtree(dataPath, ignore_errors=True)
20472048
except FileNotFoundError:

plenum/server/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def getPrimaryStorage(self):
531531
# TODO: add a place for initialization of all ledgers, so it's clear what ledgers we have,
532532
# and how they are initialized
533533
genesis_txn_initiator = GenesisTxnInitiatorFromFile(
534-
self.config.baseDir, self.config.domainTransactionsFile)
534+
self.basedirpath, self.config.domainTransactionsFile)
535535
return Ledger(
536536
CompactMerkleTree(
537537
hashStore=self.getHashStore('domain')),
@@ -2724,6 +2724,6 @@ def logNodeInfo(self):
27242724
"""
27252725
self.nodeInfo['data'] = self.collectNodeInfo()
27262726

2727-
with closing(open(os.path.join(self.config.baseDir, 'node_info'), 'w')) \
2727+
with closing(open(os.path.join(self.basedirpath, 'node_info'), 'w')) \
27282728
as logNodeInfoFile:
27292729
logNodeInfoFile.write(json.dumps(self.nodeInfo['data']))

0 commit comments

Comments
 (0)