From 12b11f3217da0a5bdc0e51298b707c984eb5d86f Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Fri, 5 Feb 2021 23:46:25 +0000 Subject: [PATCH] get_product_info: _sha in hex representation This garantees that the output is serializable by JSON (no bytes objects) --- steam/client/builtins/apps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/steam/client/builtins/apps.py b/steam/client/builtins/apps.py index 8790630..68812ab 100644 --- a/steam/client/builtins/apps.py +++ b/steam/client/builtins/apps.py @@ -1,3 +1,4 @@ +from binascii import hexlify import vdf from steam.enums import EResult, EServerType from steam.enums.emsg import EMsg @@ -149,7 +150,7 @@ class Apps(object): data['apps'][app.appid]['_missing_token'] = app.missing_token data['apps'][app.appid]['_change_number'] = app.change_number - data['apps'][app.appid]['_sha'] = app.sha + data['apps'][app.appid]['_sha'] = hexlify(app.sha).decode('ascii') data['apps'][app.appid]['_size'] = app.size if app.buffer and raw: @@ -163,7 +164,7 @@ class Apps(object): data['packages'][pkg.packageid]['_missing_token'] = pkg.missing_token data['packages'][pkg.packageid]['_change_number'] = pkg.change_number - data['packages'][pkg.packageid]['_sha'] = pkg.sha + data['packages'][pkg.packageid]['_sha'] = hexlify(pkg.sha).decode('ascii') data['packages'][pkg.packageid]['_size'] = pkg.size if pkg.buffer and raw: