Skip to content

Commit

Permalink
Fix gifsicle & pciutils
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa committed Feb 23, 2017
1 parent b4c1eec commit d464ba8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
16 changes: 9 additions & 7 deletions gifsicle.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
}
},
"autoupdate": {
"32bit": {
"extract_dir": "gifsicle-$version-win32",
"url": "https://eternallybored.org/misc/gifsicle/releases/gifsicle-$version-win32.zip"
},
"64bit": {
"extract_dir": "gifsicle-$version-win64",
"url": "https://eternallybored.org/misc/gifsicle/releases/gifsicle-$version-win64.zip"
"architecture": {
"32bit": {
"extract_dir": "gifsicle-$version-win32",
"url": "https://eternallybored.org/misc/gifsicle/releases/gifsicle-$version-win32.zip"
},
"64bit": {
"extract_dir": "gifsicle-$version-win64",
"url": "https://eternallybored.org/misc/gifsicle/releases/gifsicle-$version-win64.zip"
}
}
},
"bin": [
Expand Down
6 changes: 3 additions & 3 deletions jsonfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import os
import sys

if sys.version_info >= (3, 0):
sys.exit("Sorry, this script has only been tested with Python 2.x")


def decode(s):
if sys.version_info >= (3, 0):
return s

for encoding in 'utf-8-sig', 'utf-16':
try:
return s.decode(encoding)
Expand Down
16 changes: 9 additions & 7 deletions pciutils.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
}
},
"autoupdate": {
"32bit": {
"extract_dir": "pciutils-$version-win32",
"url": "https://eternallybored.org/misc/pciutils/releases/pciutils-$version-win32.zip"
},
"64bit": {
"extract_dir": "pciutils-$version-win64",
"url": "https://eternallybored.org/misc/pciutils/releases/pciutils-$version-win64.zip"
"architecture": {
"32bit": {
"extract_dir": "pciutils-$version-win32",
"url": "https://eternallybored.org/misc/pciutils/releases/pciutils-$version-win32.zip"
},
"64bit": {
"extract_dir": "pciutils-$version-win64",
"url": "https://eternallybored.org/misc/pciutils/releases/pciutils-$version-win64.zip"
}
}
},
"bin": [
Expand Down
5 changes: 4 additions & 1 deletion validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@


def decode(s):
if sys.version_info >= (3, 0):
return s

for encoding in 'utf-8-sig', 'utf-16':
try:
return s.decode(encoding)
Expand All @@ -33,7 +36,7 @@ def decode(s):
schema_data = json.load(f)

with open(file, 'r') as f:
jstr = f.read(os.path.getsize(file))
jstr = f.read()

jstr_no_bom = decode(jstr)
failed = file + '.failed'
Expand Down

0 comments on commit d464ba8

Please sign in to comment.