[postr] Synced flickrest agains bzr upstream



commit 2307308d32c8a0ad49ef7553532960f73272b070
Author: Ross Burton <ross burtonini com>
Date:   Mon Dec 14 11:46:57 2009 -0300

    Synced flickrest agains bzr upstream
    
    Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>

 src/flickrest.py |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/flickrest.py b/src/flickrest.py
index 018f151..23b0a95 100644
--- a/src/flickrest.py
+++ b/src/flickrest.py
@@ -22,10 +22,8 @@ import proxyclient as client
 
 try:
     from hashlib import md5
-    has_hashlib = True
 except ImportError:
     from md5 import md5
-    has_hashlib = False
 
 try:
     from xml.etree import ElementTree
@@ -104,11 +102,7 @@ class Flickr:
         sig = reduce(lambda sig, key: sig + key + str(kwargs[key]),
                      sorted(kwargs.keys()),
                      self.secret)
-        if has_hashlib:
-            kwargs['api_sig'] = md5(sig).hexdigest()
-        else:
-            kwargs['api_sig'] = md5.new(sig).hexdigest()
-
+        kwargs['api_sig'] = md5(sig).hexdigest()
 
     def __call(self, method, kwargs):
         kwargs["method"] = method



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]