comparison src/memory/memory.py @ 460:fb1abc0f8c6a

backend: added warning message when jabberfr workaround is used + fixed missing warning method
author Goffi <goffi@goffi.org>
date Tue, 13 Mar 2012 22:04:03 +0100
parents cf005701624b
children 448ce3c9e2ac
comparison
equal deleted inserted replaced
459:cf005701624b 460:fb1abc0f8c6a
638 638
639 def getServerServiceEntity(self, category, type, profile): 639 def getServerServiceEntity(self, category, type, profile):
640 """Helper method to get first available entity for a service""" 640 """Helper method to get first available entity for a service"""
641 entities = self.getServerServiceEntities(category, type, profile) 641 entities = self.getServerServiceEntities(category, type, profile)
642 if entities == None: 642 if entities == None:
643 warning(_("Entities not available, maybe they haven't been asked to server yet ?")) 643 warning(_("Entities (%(category)s/%(type)s) not available, maybe they haven't been asked to server yet ?") % {"category":category,
644 "type":type})
644 return None 645 return None
645 else: 646 else:
646 return list(entities)[0] if entities else None 647 return list(entities)[0] if entities else None
647 648
648 def hasServerFeature(self, feature, profile_key): 649 def hasServerFeature(self, feature, profile_key):