From 5f4b80e5a1508116271ae8a6087834fff8ee3825 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 29 Jun 2009 10:18:10 +0000 Subject: - Use ``caller_package`` function instead of ``caller_module`` function within ``templating`` to avoid needing to name the caller module in resource overrides (actually match docs). - Make it possible to override templates stored directly in a module with templates in a subdirectory of the same module, stored directly within another module, or stored in a subdirectory of another module (actually match docs). --- repoze/bfg/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoze/bfg/resource.py') diff --git a/repoze/bfg/resource.py b/repoze/bfg/resource.py index 00e30170d..d11993e5b 100644 --- a/repoze/bfg/resource.py +++ b/repoze/bfg/resource.py @@ -53,7 +53,7 @@ class PackageOverrides: self.overridden_package = overridden_package def insert(self, path, package, prefix): - if path.endswith('/'): + if not path or path.endswith('/'): override = DirectoryOverride(path, package, prefix) else: override = FileOverride(path, package, prefix) -- cgit v1.2.3