Browse Source

holy fuck

master
Victor Fors 2 years ago
parent
commit
e733e5cd0a
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      sstatus

+ 5
- 2
sstatus View File

@@ -3,7 +3,10 @@ import requests
import sys
import textwrap
import pprint
import simplejson
try:
from simplejson.errors import JSONDecodeError
except ImportError:
from json.decoder import JSONDecodeError

api = 'http://api.steampowered.com/'
key = '63578AF8E85EDF1E49411D5D4E18E166'
@@ -20,7 +23,7 @@ def json_query(url, transform, params={}):
sys.exit(1)
try:
data = result.json()
except simplejson.errors.JSONDecodeError as err:
except JSONDecodeError as err:
print('Error when decoding JSON:\nFrom endpoint ' + url + ':\n' + str(err) + '\n' + str(result) + '\n')
sys.exit(1)
try:


Loading…
Cancel
Save