Permalink
Browse files

updated to maintain 2.4 compatibility

  • Loading branch information...
1 parent 7538124 commit b14e4e707c29e7478a1cc52a96b36bfb78ceefd5 @jordanm jordanm committed Mar 22, 2012
Showing with 13 additions and 5 deletions.
  1. +1 −1 mesh/binding/javascript.py
  2. +11 −3 mesh/standard/mock.py
  3. +1 −1 requirements.txt
@@ -3,7 +3,7 @@
try:
import json
except ImportError:
- import simplejson as json
+ from scheme import json
from mesh.constants import *
from mesh.transport.http import STATUS_CODES
View
@@ -1,10 +1,18 @@
-import json as _json
import os
-import sqlite3
from datetime import date, datetime, time
from operator import itemgetter
from time import mktime, strptime
+try:
+ import json as _json
+except ImportError:
+ from scheme import json as _json
+
+try:
+ import sqlite3
+except ImportError:
+ from pysqlite2 import dbapi2 as sqlite3
+
from mesh.standard.controllers import StandardController
from scheme.timezone import LOCAL, UTC
@@ -89,7 +97,7 @@ def get(self, name, id):
self._create_table(name)
cursor = self.connection.execute(self.GET % name, (id,))
try:
- return self._create_resource(next(cursor))
+ return self._create_resource(cursor.next())
except StopIteration:
return None
View
@@ -1,4 +1,4 @@
nose
--e git+https://github.com/jordanm/simplejson.git#egg=simplejson
+pysqlite2
unittest2
wsgiref

0 comments on commit b14e4e7

Please sign in to comment.