From 6cf21c6f1ff60f3e38363ded331ab77fcc30292e Mon Sep 17 00:00:00 2001
From: Art <artiom.lukyanchyk@hs-hannover.de>
Date: Thu, 14 Sep 2017 13:35:27 +0200
Subject: [PATCH] Update README.md

---
 README.md | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index ee89827..b378751 100644
--- a/README.md
+++ b/README.md
@@ -23,10 +23,12 @@ try:  # Colored logger CaaS. Auto downloaded and verified.
     import os
     import hashlib
     from urllib import request
-    cache, url = "/tmp/_colored_logger.py", "https://lab.it.hs-hannover.de/lukyanch/pydevutils/raw/fa4af6555a8eb996e1be158ca12691de9b33ba45/colored_logger.py"
-    code = bool(os.path.exists(cache) or request.urlretrieve(url, cache)) and open(cache, "r").read()
-    assert hashlib.sha256(code.encode()).hexdigest() == "d4d261a40f95733f9fb184fc4ccb55d007b880cb62c8d6a06824d43eeb1391ac", "unrecognized content in " + cache
+    url, sha256 = "https://lab.it.hs-hannover.de/lukyanch/pydevutils/raw/117de29d/colored_logger.py", "4773babf593533e1175c981a32e3c0e53308b4dc5e56c902b2b29e00c7953d7a"
+    cached_file = "/tmp/{0}.py".format(sha256)
+    code = bool(os.path.exists(cached_file) or [request.urlretrieve(url, cached_file), print("Downloaded: " + url)]) and open(cached_file, "r").read()
+    assert hashlib.sha256(code.encode()).hexdigest() == sha256, os.remove(cached_file) or "Bad content: " + cached_file
     exec(code)
 except Exception as e:
     print("No colored logger: {e.__class__.__name__}: {e}".format(e=e))
+
 ```
-- 
GitLab