OpWallet: create wallet dirs in initializer

This commit is contained in:
The MMGen Project 2026-09-21 10:30:51 +00:00
commit 9bd50fd093
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 3 additions and 2 deletions

View file

@ -26,8 +26,6 @@ class OpCreate(OpWallet):
def check_uopts(self):
if self.cfg.restore_height != 'current' and int(self.cfg.restore_height or 0) < 0:
die(1, f'{self.cfg.restore_height}: invalid value for --restore-height (less than zero)')
if self.cfg.compat:
self.cfg.wallet_dir.mkdir(parents=True, exist_ok=True)
async def process_wallet(self, d, fn, last):
msg_r('') # for pexpect

View file

@ -72,6 +72,9 @@ class OpWallet(OpBase):
trust_monerod = self.trust_monerod,
test_monerod = not self.wallet_offline)
if self.is_create and self.cfg.compat:
self.wd.wallet_dir.mkdir(parents=True, exist_ok=True)
if self.wallet_offline:
self.wd.usr_daemon_args = ['--offline']