Skip to content

Commit

Permalink
Its append which need to work
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernhard committed Jan 27, 2025
1 parent 4da4a5b commit 273ffc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/subscription_manager/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,14 @@ def add_os_product_tags(product_tags):

dist_info = HardwareCollector().get_distribution()
os_product = "{name}-{version}".format(name=dist_info[4], version=dist_info[1])
all_tags.append(os_product)

if isinstance(all_tags, list):
all_tags.append(os_product)
elif isinstance(all_tags, set):
all_tags.add(os_product)
else:
raise TypeError("Unsupported collection type for `all_tags`. Use a list or set.")

return all_tags


Expand Down

0 comments on commit 273ffc1

Please sign in to comment.