~nchohan/appscale/zk3.3.4

« back to all changes in this revision

Viewing changes to AppServer/google/appengine/ext/remote_api/handler.py

  • Committer: Chris Bunch
  • Date: 2012-02-17 08:19:21 UTC
  • mfrom: (787.2.3 appscale-raj-merge)
  • Revision ID: cgb@cs.ucsb.edu-20120217081921-pakidyksaenlpzur
merged with main branch, gaining rabbitmq and upgrades for hbase, cassandra, and hypertable, as well as upgrading to gae 1.6.1 for python and go

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
import logging
64
64
import os
65
65
import pickle
66
 
import sha
67
66
import sys
68
67
import wsgiref.handlers
69
68
import yaml
 
69
import hashlib
70
70
 
71
71
from google.appengine.api import api_base_pb
72
72
from google.appengine.api import apiproxy_stub
193
193
              datastore_pb.Error.CONCURRENT_TRANSACTION,
194
194
              "Transaction precondition failed.")
195
195
        elif entity.has_entity():
196
 
          entity_hash = sha.new(entity.entity().Encode()).digest()
 
196
          entity_hash = hashlib.sha1(entity.entity().Encode()).digest()
197
197
          if precondition.hash() != entity_hash:
198
198
            raise apiproxy_errors.ApplicationError(
199
199
                datastore_pb.Error.CONCURRENT_TRANSACTION,
350
350
</body>
351
351
</html>"""
352
352
 
 
353
application = webapp.WSGIApplication([('.*', ApiCallHandler)])
 
354
 
353
355
 
354
356
def main():
355
 
  application = webapp.WSGIApplication([('.*', ApiCallHandler)])
356
357
  wsgiref.handlers.CGIHandler().run(application)
357
358
 
358
359