From: Ulas Kozat Date: Mon, 6 Jun 2016 21:09:45 +0000 (-0700) Subject: error was occurring when a template is subscribed without label subscription X-Git-Tag: colorado.1.0~36 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F15235%2F1;p=domino.git error was occurring when a template is subscribed without label subscription Change-Id: I490615fe231b679089984390a1bcbbe87c059f6c Signed-off-by: Ulas Kozat --- diff --git a/DominoServer.py b/DominoServer.py index 05f1ab2..c9a64b1 100755 --- a/DominoServer.py +++ b/DominoServer.py @@ -169,19 +169,19 @@ class CommunicationHandler: elif sub_msg.template_op == DELETE: self.dominoServer.subscribed_templateformats[sub_msg.domino_udid].difference_update(set(sub_msg.supported_template_types)) - if sub_msg.labels != []: - if sub_msg.label_op == APPEND: - logging.debug('APPENDING Labels...') - if self.dominoServer.subscribed_labels.has_key(sub_msg.domino_udid): - self.dominoServer.subscribed_labels[sub_msg.domino_udid].update(set(sub_msg.labels)) - else: - self.dominoServer.subscribed_labels[sub_msg.domino_udid] = set(sub_msg.labels) - elif sub_msg.label_op == OVERWRITE: - logging.debug('OVERWRITING Labels...') - self.dominoServer.subscribed_labels[sub_msg.domino_udid] = set(sub_msg.labels) - elif sub_msg.label_op == DELETE: - logging.debug('DELETING Labels...') - self.dominoServer.subscribed_labels[sub_msg.domino_udid].difference_update(set(sub_msg.labels)) +# if sub_msg.labels != []: + if sub_msg.label_op == APPEND: + logging.debug('APPENDING Labels...') + if self.dominoServer.subscribed_labels.has_key(sub_msg.domino_udid): + self.dominoServer.subscribed_labels[sub_msg.domino_udid].update(set(sub_msg.labels)) + else: + self.dominoServer.subscribed_labels[sub_msg.domino_udid] = set(sub_msg.labels) + elif sub_msg.label_op == OVERWRITE: + logging.debug('OVERWRITING Labels...') + self.dominoServer.subscribed_labels[sub_msg.domino_udid] = set(sub_msg.labels) + elif sub_msg.label_op == DELETE: + logging.debug('DELETING Labels...') + self.dominoServer.subscribed_labels[sub_msg.domino_udid].difference_update(set(sub_msg.labels)) logging.debug('Supported Template: %s Supported Labels: %s' , self.dominoServer.subscribed_templateformats[sub_msg.domino_udid] , self.dominoServer.subscribed_labels[sub_msg.domino_udid])