Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
get_package_path updated to work in py3 and py3
  • Loading branch information
dieselmachine committed Mar 24, 2023
commit 2d562cb81d4a82734817a5ba62cb63b155531390
4 changes: 3 additions & 1 deletion baph/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def get_package_path(self, package):
return None
if not loader.is_package(package):
raise ValueError('%r is not a package' % package)
self.package_paths[package] = loader.filename
fullpath = loader.get_filename()
path, filename = fullpath.rsplit('/', 1)
self.package_paths[package] = path
return self.package_paths[package]

@staticmethod
Expand Down