From 2cb5b14b9b9c57b08e020ff01b705df2e9e1237e Mon Sep 17 00:00:00 2001 From: thomasv Date: Wed, 27 Feb 2013 09:09:58 +0100 Subject: [PATCH] deep copy output to prevent side-effect --- lib/commands.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/commands.py b/lib/commands.py index ec587f4..ebb36c3 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -121,7 +121,8 @@ class Commands: return h def listunspent(self): - l = self.wallet.get_unspent_coins() + import copy + l = copy.deepcopy(self.wallet.get_unspent_coins()) for i in l: i["value"] = i["value"]*1e-8 return l -- 1.7.1