mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 18:44:20 +01:00
data dir fix
This commit is contained in:
@@ -83,7 +83,6 @@ class Database(Compat):
|
||||
self.name = db_name
|
||||
self.db_location = db_location
|
||||
self.db_location_is_url = "://" in self.db_location
|
||||
|
||||
if self.db_location_is_url:
|
||||
raise Exception("Remote databases not supported. Use SQLite.")
|
||||
# database_uri = self.db_location
|
||||
|
||||
@@ -19,6 +19,7 @@ if not DEBUG:
|
||||
sys.tracebacklimit = 0
|
||||
|
||||
CASHU_DIR = env.str("CASHU_DIR", default=os.path.join(str(Path.home()), ".cashu"))
|
||||
CASHU_DIR = CASHU_DIR.replace("~", str(Path.home()))
|
||||
assert len(CASHU_DIR), "CASHU_DIR not defined"
|
||||
|
||||
LIGHTNING = env.bool("LIGHTNING", default=True)
|
||||
|
||||
@@ -4,6 +4,7 @@ import asyncio
|
||||
import base64
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
@@ -50,7 +51,7 @@ def cli(ctx, host: str, walletname: str):
|
||||
ctx.ensure_object(dict)
|
||||
ctx.obj["HOST"] = host
|
||||
ctx.obj["WALLET_NAME"] = walletname
|
||||
wallet = Wallet(ctx.obj["HOST"], f"{CASHU_DIR}/{walletname}", walletname)
|
||||
wallet = Wallet(ctx.obj["HOST"], os.path.join(CASHU_DIR, walletname))
|
||||
ctx.obj["WALLET"] = wallet
|
||||
asyncio.run(init_wallet(wallet))
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user