@@ -132,7 +132,7 @@ def calculate_etag (node, classname="Missing", id="0"):
132132 '''
133133
134134 items = node .items (protected = True ) # include every item
135- etag = md5 (bs2b (repr (items ))).hexdigest ()
135+ etag = md5 (bs2b (repr (sorted ( items ) ))).hexdigest ()
136136 logger .debug ("object=%s%s; tag=%s; repr=%s" , classname , id ,
137137 etag , repr (node .items (protected = True )))
138138 return etag
@@ -1336,7 +1336,7 @@ def summary(self, input):
13361336 summary .setdefault (status_name , []).append (issue_object )
13371337 messages .append ((num , issue_object ))
13381338
1339- messages . sort ( reverse = True )
1339+ sorted ( messages , key = lambda tup : tup [ 0 ], reverse = True )
13401340
13411341 result = {
13421342 'created' : created ,
@@ -1450,7 +1450,7 @@ def dispatch(self, method, uri, input):
14501450 output = RoundupJSONEncoder (indent = indent ).encode (output )
14511451 elif data_type .lower () == "xml" and dicttoxml :
14521452 self .client .setHeader ("Content-Type" , "application/xml" )
1453- output = dicttoxml (output , root = False )
1453+ output = b2s ( dicttoxml (output , root = False ) )
14541454 else :
14551455 self .client .response_code = 406
14561456 output = "Content type is not accepted by client"
0 commit comments