Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Jan 2, 2025
1 parent b264103 commit 3b27ae8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def go(self, handle, pkg):
pkg = await handle(self, pkg)
except Exception as e:
reason = str(e) or f'unknown error: {type(e).__name__}'
logging.error(reason)
logging.exception(reason)
data = {'reason': reason}
pkg = Package.make(self.PROTO_RAPP_ERR, data=data, pid=pkg.pid)
self.write(pkg)
Expand Down
5 changes: 5 additions & 0 deletions lib/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ def get(cls):
if use and isinstance(use, str):
item['use'] = use
elif isinstance(config, dict):
# Make a deep copy
config = copy.deepcopy(config)
# Make sure to replace passwords and secrets
cls._replace_secrets(config)

item['config'] = config
else:
logging.error(f'invalid config for {name}')
Expand Down
2 changes: 1 addition & 1 deletion lib/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.0-alpha13'
__version__ = '0.1.0-alpha14'

0 comments on commit 3b27ae8

Please sign in to comment.