From 5e2ba24ef8888fa8a44e6a28a8d3b5cfb2d0f0b8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 26 Nov 2010 18:15:16 +0100 Subject: [PATCH] Fix private_id function. The builtin function reversed() returned a generator which created a new hash everytime. --- fireinfo/system.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fireinfo/system.py b/fireinfo/system.py index 43807c3..a8b7618 100644 --- a/fireinfo/system.py +++ b/fireinfo/system.py @@ -96,7 +96,11 @@ class System(object): No one could ever guess this without access to the host. """ - return hashlib.sha1("%s" % reversed(self._unique_id)).hexdigest() + private_id = "" + for i in reversed(self._unique_id): + private_id += i + + return hashlib.sha1(private_id).hexdigest() @property def _unique_id(self): -- 2.47.3