From 9817ab14d0e72caee8351db74dcb9257ef236bbb Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 24 Jan 2019 10:23:56 -0500 Subject: [PATCH] clean up some minor linting issues --- awx/main/utils/common.py | 2 +- awx/main/utils/mem_inventory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/utils/common.py b/awx/main/utils/common.py index 77f3c8e879..ee399ce348 100644 --- a/awx/main/utils/common.py +++ b/awx/main/utils/common.py @@ -498,7 +498,7 @@ def copy_m2m_relationships(obj1, obj2, fields, kwargs=None): if isinstance(override_field_val, (set, list, QuerySet)): getattr(obj2, field_name).add(*override_field_val) continue - if override_field_val.__class__.__name__ is 'ManyRelatedManager': + if override_field_val.__class__.__name__ == 'ManyRelatedManager': src_field_value = override_field_val dest_field = getattr(obj2, field_name) dest_field.add(*list(src_field_value.all().values_list('id', flat=True))) diff --git a/awx/main/utils/mem_inventory.py b/awx/main/utils/mem_inventory.py index fd406b91d9..7f72b3b396 100644 --- a/awx/main/utils/mem_inventory.py +++ b/awx/main/utils/mem_inventory.py @@ -54,7 +54,7 @@ class MemGroup(MemObject): return '<_in-memory-group_ `{}`>'.format(self.name) def add_child_group(self, group): - assert group.name is not 'all', 'group name is all' + assert group.name != 'all', 'group name is all' assert isinstance(group, MemGroup), 'not MemGroup instance' logger.debug('Adding child group %s to parent %s', group.name, self.name) if group not in self.children: