[CalendarServer-changes] [3463] CalDAVTester/trunk/src

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 5 07:53:05 PST 2008


Revision: 3463
          http://trac.macosforge.org/projects/calendarserver/changeset/3463
Author:   cdaboo at apple.com
Date:     2008-12-05 07:53:05 -0800 (Fri, 05 Dec 2008)
Log Message:
-----------
Clean-up Python 2.6 warnings.

Modified Paths:
--------------
    CalDAVTester/trunk/src/account.py
    CalDAVTester/trunk/src/request.py

Modified: CalDAVTester/trunk/src/account.py
===================================================================
--- CalDAVTester/trunk/src/account.py	2008-12-05 02:07:09 UTC (rev 3462)
+++ CalDAVTester/trunk/src/account.py	2008-12-05 15:53:05 UTC (rev 3463)
@@ -18,9 +18,9 @@
 Class that encapsulates the account information for populating a CalDAV server.
 """
 
+from hashlib import md5
 from utilities import webdav
 import copy
-import md5
 import os
 import src.xmlDefs
 
@@ -169,12 +169,12 @@
             file_object.close( )
 
         if self.datacount == 1:
-            rpath = cpath + md5.new(cpath + item + str(self.count)).hexdigest() + ".ics"
+            rpath = cpath + md5(cpath + item + str(self.count)).hexdigest() + ".ics"
             webdav.Put(server_info, rpath, "text/calendar; charset=utf-8", caldata).run()
         else:
             for ctr in range(1, self.datacount + 1):
                 data = caldata.replace(self.datacountarg, str(ctr))
-                rpath = cpath + md5.new(cpath + item + str(self.count) + str(ctr)).hexdigest() + ".ics"
+                rpath = cpath + md5(cpath + item + str(self.count) + str(ctr)).hexdigest() + ".ics"
                 webdav.Put(server_info, rpath, "text/calendar; charset=utf-8", data).run()
 
     def parseXML( self, node ):

Modified: CalDAVTester/trunk/src/request.py
===================================================================
--- CalDAVTester/trunk/src/request.py	2008-12-05 02:07:09 UTC (rev 3462)
+++ CalDAVTester/trunk/src/request.py	2008-12-05 15:53:05 UTC (rev 3463)
@@ -18,17 +18,16 @@
 Defines the 'request' class which encapsulates an HTTP request and verification.
 """
 
+from hashlib import md5, sha1
 import base64
 import httplib
-import md5
-import sha
 import src.xmlDefs
 import time
 
 algorithms = {
-    'md5': md5.new,
-    'md5-sess': md5.new,
-    'sha': sha.new,
+    'md5': md5,
+    'md5-sess': md5,
+    'sha': sha1,
 }
 
 # DigestCalcHA1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081205/6812736d/attachment.html>


More information about the calendarserver-changes mailing list