Commit c1dbfbf8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove deprecation warning on python 2.6 or later.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39889 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e461f89a
...@@ -30,7 +30,10 @@ import cPickle, sys ...@@ -30,7 +30,10 @@ import cPickle, sys
from DateTime import DateTime from DateTime import DateTime
from zLOG import LOG, WARNING, ERROR from zLOG import LOG, WARNING, ERROR
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
import sha try:
from hashlib import sha1 as sha_new
except ImportError:
from sha import new as sha_new
from cStringIO import StringIO from cStringIO import StringIO
import transaction import transaction
...@@ -261,7 +264,7 @@ class Queue: ...@@ -261,7 +264,7 @@ class Queue:
# is true in Python. This is important, because dtml-if assumes that an empty # is true in Python. This is important, because dtml-if assumes that an empty
# string is false, so we must use a non-empty string for this. # string is false, so we must use a non-empty string for this.
return 'none' return 'none'
return sha.new(repr(order_validation_item_list)).hexdigest() return sha_new(repr(order_validation_item_list)).hexdigest()
def getMessageList(self, activity_tool, processing_node=None,**kw): def getMessageList(self, activity_tool, processing_node=None,**kw):
return [] return []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment