Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_file_sharing_management.py @ 2934:0bafdbda7f5f
plugin file sharing management: filter out empty values in allowed_jids
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 03 May 2019 20:41:28 +0200 |
parents | e0429ff7f6b6 |
children | ab2696e34d29 |
comparison
equal
deleted
inserted
replaced
2933:47df940738a7 | 2934:0bafdbda7f5f |
---|---|
273 allowed_jids = u'PUBLIC' | 273 allowed_jids = u'PUBLIC' |
274 elif read_allowed.value.strip() == u'': | 274 elif read_allowed.value.strip() == u'': |
275 allowed_jids = None | 275 allowed_jids = None |
276 else: | 276 else: |
277 try: | 277 try: |
278 allowed_jids = [jid.JID(v.strip()) for v in read_allowed.values] | 278 allowed_jids = [jid.JID(v.strip()) for v in read_allowed.values |
279 if v.strip()] | |
279 except RuntimeError as e: | 280 except RuntimeError as e: |
280 log.warning(_(u"Can't use read_allowed values: {reason}").format( | 281 log.warning(_(u"Can't use read_allowed values: {reason}").format( |
281 reason=e)) | 282 reason=e)) |
282 self._c.adHocError(self._c.ERROR.BAD_PAYLOAD) | 283 self._c.adHocError(self._c.ERROR.BAD_PAYLOAD) |
283 | 284 |