~blowry/steamarchiver

4a55ef3d13974d6b003ebf26b034e44156d8d813 — Benjamin Lowry 4 months ago edb3676
get_appinfo: handle responses with no tokens
1 files changed, 4 insertions(+), 3 deletions(-)

M get_appinfo.py
M get_appinfo.py => get_appinfo.py +4 -3
@@ 65,9 65,10 @@ if __name__ == "__main__":
    print("Getting app access tokens...")
    tokens = steam_client.get_access_tokens(app_ids=appids)
    token_count = 0
    for app, token in tokens['apps'].items():
        if token != 0:
            token_count += 1
    if tokens and 'apps' in tokens.items():
        for app, token in tokens['apps'].items():
            if token != 0:
                token_count += 1
    single = (token_count == 1)
    print("Got", "token" if single else "tokens", "for", token_count, "app" if single else "apps")