mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix detection of packages in zipplugin
This commit is contained in:
parent
2d9ac6aa54
commit
70ca16c3ef
@ -248,7 +248,11 @@ class CalibrePluginFinder:
|
|||||||
fullname_in_plugin += '.__init__'
|
fullname_in_plugin += '.__init__'
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
is_package = fullname.count('.') < 2 or fullname == '__init__' or fullname.endswith('__init__')
|
is_package = bool(
|
||||||
|
fullname.count('.') < 2 or
|
||||||
|
fullname_in_plugin == '__init__' or
|
||||||
|
(fullname_in_plugin and fullname_in_plugin.endswith('__init__'))
|
||||||
|
)
|
||||||
if zip_file_path:
|
if zip_file_path:
|
||||||
filename = posixpath.join(zip_file_path, *fullname_in_plugin.split('.')) + '.py'
|
filename = posixpath.join(zip_file_path, *fullname_in_plugin.split('.')) + '.py'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user