Skip to content

Commit

Permalink
- 优化豆瓣详情展示
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Nov 20, 2023
1 parent 539d9cf commit a324731
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frozen.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ def collect_pkg_data(package: str, include_py_files: bool = False, subdir: str =
from PyInstaller.utils.hooks import get_package_paths, PY_IGNORE_EXTENSIONS
from PyInstaller.building.datastruct import TOC

data_toc = TOC()

# Accept only strings as packages.
if type(package) is not str:
raise ValueError

pkg_base, pkg_dir = get_package_paths(package)
try:
pkg_base, pkg_dir = get_package_paths(package)
except ValueError:
return data_toc
if subdir:
pkg_path = Path(pkg_dir) / subdir
else:
pkg_path = Path(pkg_dir)
# Walk through all file in the given package, looking for data files.
data_toc = TOC()
if not pkg_path.exists():
return data_toc
for file in pkg_path.rglob('*'):
Expand Down

0 comments on commit a324731

Please sign in to comment.