find_path fails if name does not contain path name separator
In this case module_path is None
which is not allowed for path join:
Traceback (most recent call last):
File "/home/ced/Projects/tryton/./trytond/bin/trytond-admin", line 33, in <module>
admin.run(options)
File "/home/ced/Projects/tryton/trytond/trytond/admin.py", line 174, in run
find_dir(module)
File "/home/ced/Projects/tryton/trytond/trytond/tools/misc.py", line 95, in find_dir
return find_path(name, subdir=subdir, _test=os.path.isdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/tools/misc.py", line 72, in find_path
path = secure_join(root_path, module_name, module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/tools/misc.py", line 59, in secure_join
path = os.path.join(root, *paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 90, in join
File "<frozen genericpath>", line 152, in _check_arg_types
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'