server/sources/__init__.py
changeset 10580 5fbdbbe51867
parent 10086 98bc2ca1a816
child 10589 7c23b7de2b8d
--- a/server/sources/__init__.py	Wed Jul 29 10:18:56 2015 +0200
+++ b/server/sources/__init__.py	Fri Jul 24 16:15:17 2015 +0200
@@ -21,6 +21,7 @@
 
 from time import time
 from logging import getLogger
+from base64 import b64decode
 
 from logilab.common import configuration
 from logilab.common.deprecation import deprecated
@@ -196,6 +197,12 @@
         else:
             self.urls = []
 
+    @staticmethod
+    def decode_extid(extid):
+        if extid is None:
+            return extid
+        return b64decode(extid)
+
     # source initialization / finalization #####################################
 
     def set_schema(self, schema):