Skip to content

Commit

Permalink
Remove CBR import bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
jholtmann committed Jan 12, 2023
1 parent 4f8284f commit 509e131
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions load.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import sys
from typing import Type, Iterable

import click

from common import Product

# import all files in the 'products' folder
Expand All @@ -14,11 +11,6 @@

sub_module = module[:-3]

# cbapi module has broken imports for Python 3.10+
# importing it here would result in none of the products working on Python 3.10+
if sub_module == 'vmware_cb_response':
continue

__import__('products.' + sub_module, locals(), globals())
del module

Expand All @@ -42,14 +34,6 @@ def get_product_instance(product: str, **kwargs) -> Product:
"""
Get an instance of the product implementation matching the specified product string.
"""
if product == 'cbr':
if sys.version_info.major == 3 and sys.version_info.minor > 9:
click.secho(f'cbr only functions on Python 3.9 due to a library limitation', fg='red')
exit(1)

from products.vmware_cb_response import CbResponse
return CbResponse(**kwargs)

for subclass in _get_subclasses():
if subclass.product == product:
return subclass(**kwargs)
Expand Down

0 comments on commit 509e131

Please sign in to comment.