summaryrefslogtreecommitdiff
path: root/doc/data/messages/l/logging-not-lazy/bad.py
diff options
context:
space:
mode:
authorMatus Valo <matusvalo@users.noreply.github.com>2022-05-15 23:39:48 +0200
committerGitHub <noreply@github.com>2022-05-15 23:39:48 +0200
commit3f707821eccb2e8fda1b6cccab9de32e1f822eed (patch)
tree4487d6c07d459c39d2ea678bd97f45269e42196f /doc/data/messages/l/logging-not-lazy/bad.py
parent0007c3247e8a71d71f94f3332d7eb45360e445ee (diff)
downloadpylint-git-3f707821eccb2e8fda1b6cccab9de32e1f822eed.tar.gz
Added logging-not-lazy message example (#6619)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'doc/data/messages/l/logging-not-lazy/bad.py')
-rw-r--r--doc/data/messages/l/logging-not-lazy/bad.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/data/messages/l/logging-not-lazy/bad.py b/doc/data/messages/l/logging-not-lazy/bad.py
new file mode 100644
index 000000000..be6b98cb6
--- /dev/null
+++ b/doc/data/messages/l/logging-not-lazy/bad.py
@@ -0,0 +1,7 @@
+import logging
+
+try:
+ function()
+except Exception as e:
+ logging.error('Error occured: %s' % e) # [logging-not-lazy]
+ raise