protonscr

driverhelper.py: ImportError if json is missing

steamclosed reviewed
ValveSoftware/steam-for-linux#185 · opened 2012-12-21 by JLimperg · updated 2012-12-22 · 1 comments · github
JJLimperg 2012-12-21 github

driverhelper.py attempts to import json twice: Once in line 3 and once again in line 12. Line 12 is designed to catch ImportErrors, so I guess line 3 is just an oversight.

Relevant code:

import os, re, sys, time, json, subprocess

try:
  import apt, aptsources.distro, aptsources.sourceslist
  apt_system = True
except ImportError:
  apt_system = False

try:
  import json
except ImportError:
  import simplejson as json
Sscottlu 2012-12-21 github

Good catch. We'll fix this.

Nothing extracted yet.