comparison sat_pubsub/pubsub_admin.py @ 417:412d26a9b2c2

import sat/wokkel modules only when making service: when importing some sat/wokkel module, a reactor is installed. This can cause trouble when using sat_pubsub along with other twisted plugin installing a specific reactor (which is the case for SàT backend and Libervia). This patch works around it by importing those modules only when making the service.
author Goffi <goffi@goffi.org>
date Tue, 08 Oct 2019 12:04:13 +0200
parents ccb2a22ea0fc
children b544109ab4c4
comparison
equal deleted inserted replaced
416:ee722faa3e93 417:412d26a9b2c2
108 items=[item], 108 items=[item],
109 requestor=requestor, 109 requestor=requestor,
110 pep=pep, 110 pep=pep,
111 recipient=recipient) 111 recipient=recipient)
112 except (error.Forbidden, error.ItemForbidden): 112 except (error.Forbidden, error.ItemForbidden):
113 __import__('pudb').set_trace()
114 self.sendError(iq_elt, "forbidden") 113 self.sendError(iq_elt, "forbidden")
115 return 114 return
116 except Exception as e: 115 except Exception as e:
117 self.sendError(iq_elt, "internal-server-error") 116 self.sendError(iq_elt, "internal-server-error")
118 log.msg("INTERNAL ERROR: {msg}".format(msg=e)) 117 log.msg("INTERNAL ERROR: {msg}".format(msg=e))