From 8731c9796a3355a7858d812991461bce62f62a12 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Wed, 31 Jul 2019 21:22:07 +0200 Subject: [PATCH] namecoin pidfile name and workaround for ci prepare. --- basicswap/basicswap.py | 4 +++- tests/basicswap/test_prepare.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index f50eabe..c8926c9 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -443,7 +443,9 @@ class BasicSwap(): chain_client_settings = self.getChainClientSettings(coin) authcookiepath = os.path.join(self.getChainDatadirPath(coin), '.cookie') - pidfilename = cc['name'] + ('d' if cc['name'] == 'bitcoin' else '') + pidfilename = cc['name'] + if cc['name'] == 'bitcoin' or cc['name'] == 'namecoin': + pidfilename += 'd' pidfilepath = os.path.join(self.getChainDatadirPath(coin), pidfilename + '.pid') self.log.debug('Reading %s rpc credentials from auth cookie %s', coin, authcookiepath) # Wait for daemon to start diff --git a/tests/basicswap/test_prepare.py b/tests/basicswap/test_prepare.py index 2c21de7..2df4e0a 100644 --- a/tests/basicswap/test_prepare.py +++ b/tests/basicswap/test_prepare.py @@ -33,7 +33,7 @@ class Test(unittest.TestCase): super(Test, self).tearDownClass() def test(self): - testargs = ['basicswap-prepare', '-datadir=' + test_path] + testargs = ['basicswap-prepare', '-datadir=' + test_path, '-particl_mnemonic=none'] # Why won't the daemon run in travis-ci? with patch.object(sys, 'argv', testargs): prepareSystem.main()