Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
83327073
Commit
83327073
authored
Aug 19, 2012
by
Clément Schreiner
Browse files
Add a __contains__ method for checking whether a plugin has been loaded.
parent
3bedbf46
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/lib/plugins.py
View file @
83327073
...
...
@@ -257,3 +257,6 @@ class Plugins(object):
""" Iter over plugin instances' names """
for
name
in
self
.
plugins
:
yield
name
def
__contains__
(
self
,
key
):
return
key
in
self
.
plugins
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment