mirror of https://github.com/rq/rq.git
removed import error warning and changed function doc (#1839)
This commit is contained in:
parent
7bbef7e05a
commit
08d8f7c30c
|
@ -182,10 +182,7 @@ def import_attribute(name: str) -> Callable[..., Any]:
|
|||
E.g.: package_a.package_b.module_a.ClassA.my_static_method
|
||||
|
||||
Thus we remove the bits from the end of the name until we can import it
|
||||
Sometimes the failure during importing is due to a genuine coding error in the imported module
|
||||
In this case, the exception is logged as a warning for ease of debugging.
|
||||
The above logic will apply anyways regardless of the cause of the import error.
|
||||
|
||||
|
||||
Args:
|
||||
name (str): The name (reference) to the path.
|
||||
|
||||
|
@ -204,7 +201,6 @@ def import_attribute(name: str) -> Callable[..., Any]:
|
|||
module = importlib.import_module(module_name)
|
||||
break
|
||||
except ImportError:
|
||||
logger.warning("Import error for '%s'" % module_name, exc_info=True)
|
||||
attribute_bits.insert(0, module_name_bits.pop())
|
||||
|
||||
if module is None:
|
||||
|
|
Loading…
Reference in New Issue