Permalink
Browse files

upgrade fixes

  • Loading branch information...
1 parent 7c2fb4d commit d6e24e55728585addbad945122e7293e8903d14a @peterbe committed Oct 13, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 bin/run_shell.py
  2. +2 −2 handlers.py
  3. +1 −1 models.py
  4. +1 −1 vendor/src/MongoLite
View
@@ -13,7 +13,7 @@
from models import User, Tweeter, connection
- from pymongo.objectid import InvalidId, ObjectId
+ from bson.objectid import InvalidId, ObjectId
import settings
db = connection[settings.DATABASE_NAME]
View
@@ -12,7 +12,7 @@
from tornado_utils.routes import route
from tornado_utils.send_mail import send_email
from tornado.escape import json_decode, json_encode
-from pymongo.objectid import InvalidId, ObjectId
+from bson.objectid import InvalidId, ObjectId
import utils
import tasks
from models import User, Tweeter
@@ -186,7 +186,7 @@ def increment_lookup_count(self, username, usernames, jsonp=False):
if not isinstance(usernames, int):
usernames = len(usernames)
self.redis.publish('lookups', tornado.escape.json_encode({
- key: int(self.redis.get(key))
+ key: int(self.redis.get(key) or 0)
}))
key = 'lookups:username:%s' % username
assert username
View
@@ -1,6 +1,6 @@
import re
import datetime
-from pymongo.objectid import ObjectId
+from bson.objectid import ObjectId
from mongolite import Connection, Document

0 comments on commit d6e24e5

Please sign in to comment.