[Bf-extensions-cvs] [53922bcc] master: BlenderKit: erase Gravatar hash from author info if the author doesn't have gravatar(saves repeated requests of author info)
Vilém Duha
noreply at git.blender.org
Wed Aug 7 21:04:16 CEST 2019
Commit: 53922bccf3c601820c4cb516b0ef46c0d00e7981
Author: Vilém Duha
Date: Wed Aug 7 20:39:27 2019 +0200
Branches: master
https://developer.blender.org/rBA53922bccf3c601820c4cb516b0ef46c0d00e7981
BlenderKit: erase Gravatar hash from author info if the author doesn't have gravatar(saves repeated requests of author info)
===================================================================
M blenderkit/search.py
===================================================================
diff --git a/blenderkit/search.py b/blenderkit/search.py
index dd7df440..064fd238 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -595,6 +595,8 @@ def fetch_author(a_id, api_key):
with open(gravatar_path, 'wb') as f:
f.write(r.content)
adata['gravatarImg'] = gravatar_path
+ elif r.status_code == '404':
+ adata['gravatarHash']= None
except Exception as e:
utils.p(e)
utils.p('finish fetch')
More information about the Bf-extensions-cvs
mailing list