[profile gen] Drop unused variables
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Nov 2016 17:33:46 +0100
changeset 1969 40e17295c68b
parent 1962 3729d83ac7e4
child 1970 b92844790328
[profile gen] Drop unused variables undetected by flake8 because of later assignment to the same name.
entities/profile_generation.py
--- a/entities/profile_generation.py	Wed Nov 09 17:00:05 2016 +0100
+++ b/entities/profile_generation.py	Wed Nov 09 17:33:46 2016 +0100
@@ -479,7 +479,7 @@
             else:
                 attrs = {'default': 'edition 2009'}
             attrs['name'] = 'listVersionID'
-            attr = self.element('xsd:attribute', attributes=attrs, parent=extension_element)
+            self.element('xsd:attribute', attributes=attrs, parent=extension_element)
         elif (xselement.local_name == 'KeywordReference' and card_entity.scheme):
             self.concept_scheme_attribute(xselement, extension_element, card_entity.scheme)
         elif getattr(value, 'cw_etype', None) == 'Concept':
@@ -490,7 +490,7 @@
                     attrs = xsd_attribute_cardinality(occ, None)
                     attrs['name'] = attrname
                     attrs['type'] = self.xsd_content_type(occ.target.textual_content_type)
-                    attr = self.element('xsd:attribute', attributes=attrs, parent=extension_element)
+                    self.element('xsd:attribute', attributes=attrs, parent=extension_element)
         fixed_value = serialize(value)
         if fixed_value is not None:
             attr = 'default' if hasattr(value, 'id') else 'fixed'