commit 88ef1be184e5b4f071e6cf4bda5409288195119f
parent 1bdab059ff18a345f7f8784c17fbcee9b46d2444
Author: lash <dev@holbrook.no>
Date: Thu, 2 Apr 2026 13:48:10 -0600
Avoid explode path string on account instance with single path segment
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dummy/usawa/account.py b/dummy/usawa/account.py
@@ -56,9 +56,11 @@ class Account:
def __init__(self, sym, typ, segments):
if not isinstance(typ, AccountType):
- raise ValueError('invalid account type')
+ raise ValueError('invalid account type: ' + typ)
self.sym = sym
self.typ = typ
+ if isinstance(segments, str):
+ segments = [segments]
self.segments = segments