def _versions(self, versions): if versions and (set(versions) - set(commands.versions(self.version))): raise StompProtocolError('Invalid versions: %s [version=%s]' % (versions, self.version)) self.__versions = versions
def _versions(self): try: self.__versions except: self.__versions = None return list(sorted(self.__versions or commands.versions(self.version)))