Skip to content

Commit 4167421

Browse files
authored
Merge pull request #100 from harness/PL-51773
PL-51773 Add guard around debug log
2 parents ad69540 + 6be6b8d commit 4167421

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

featureflags/streaming.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@ def run(self):
166166
identifier=self._msg.identifier,
167167
environment_uuid=self._environemnt_id,
168168
cluster=self._cluster).parsed
169-
log.debug("Feature config '%s' loaded", fc.feature)
170-
self._repository.set_flag(fc)
171-
log.debug('flag %s successfully stored in the cache',
172-
fc.feature)
169+
170+
if fc is None:
171+
log.debug("Feature config '%s' not loaded", self._msg.identifier)
172+
else:
173+
log.debug("Feature config '%s' loaded", fc.feature)
174+
self._repository.set_flag(fc)
175+
log.debug('flag %s successfully stored in the cache',
176+
fc.feature)
173177

174178
except UnrecoverableRequestException as e:
175179
warning_fetch_feature_by_id_failed(e)

0 commit comments

Comments
 (0)