diff options
author | Ulas Kozat <ulas.kozat@gmail.com> | 2016-06-06 14:09:45 -0700 |
---|---|---|
committer | Ulas Kozat <ulas.kozat@gmail.com> | 2016-06-06 14:09:45 -0700 |
commit | 83e4e86f94ce37458f69712d3e295e128446232b (patch) | |
tree | a0977a18cd101af9303908b10629110069c07450 | |
parent | 3d024fe639d5861774aff78a159db540d00f48ea (diff) |
error was occurring when a template is subscribed without label subscription
Change-Id: I490615fe231b679089984390a1bcbbe87c059f6c
Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
-rwxr-xr-x | DominoServer.py | 26 |
1 files changed, 13 insertions, 13 deletions
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]) |