diff options
author | Brian May <brian@linuxpenguins.xyz> | 2018-08-20 17:02:59 +1000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2018-08-20 17:03:53 +1000 |
commit | 85592e7c4627fd355fee2a7d322360f51d7c08c0 (patch) | |
tree | ca3ce3f8db23d27966c756f9f8544cb0b92a696a /lib/python/nvd.py | |
parent | b92c7cf1a42bd1588e7788a63bae735b65b27513 (diff) |
Replace "x.has_key(y)" with "y in x" syntax
Diffstat (limited to 'lib/python/nvd.py')
-rw-r--r-- | lib/python/nvd.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/nvd.py b/lib/python/nvd.py index 8110fc73ab..1e0771e13d 100644 --- a/lib/python/nvd.py +++ b/lib/python/nvd.py @@ -68,11 +68,11 @@ class _Parser(xml.sax.handler.ContentHandler): def TAG_int(self, name, attrs): self.loss_int = 1 def TAG_sec_prot(self, name, attrs): - if attrs.has_key('user'): + if 'user' in attrs: self.loss_sec_prot_user = 1 - if attrs.has_key('admin'): + if 'admin' in attrs: self.loss_sec_prot_admin = 1 - if attrs.has_key('other'): + if 'other' in attrs: self.loss_sec_prot_other = 1 def endElement(self, name): |