Fall back to simplejson when the stdlib json module is not available

develop
Sven Slootweg 12 years ago
parent 727f150621
commit 82e4826dea

@ -1,8 +1,13 @@
#!/usr/bin/python
import os, time, sys, json, urllib, urllib2, threading, re
import os, time, sys, urllib, urllib2, threading, re
from collections import deque
from BeautifulSoup import BeautifulSoup
try:
import json
except:
import simplejson as json
STOP = False
pipe_name = 'pipe_books'

@ -1,5 +1,10 @@
#!/usr/bin/python
import os, time, sys, json, _mysql
import os, time, sys, _mysql
try:
import json
except:
import simplejson as json
def stringdammit(input_string):
if isinstance(input_string, str):

Loading…
Cancel
Save