From 6bbbb51f6ef53758e614b0c97f6572423b6c8849 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 26 Mar 2015 19:40:43 -0700 Subject: [PATCH] manager: relax template requirements, allow any collection template to also be added to shared dir --- pywb/manager/manager.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pywb/manager/manager.py b/pywb/manager/manager.py index 47d03a93..cb42df0e 100644 --- a/pywb/manager/manager.py +++ b/pywb/manager/manager.py @@ -246,12 +246,10 @@ directory structure expected by pywb try: filename = templates[template_name] if not self.coll_name: - msg = ('To {1} a "{0}" template, you must specify ' + - 'a collection name: template --{1} {0}') - raise IOError(msg.format(template_name, verb)) - - full_path = os.path.join(self.templates_dir, - os.path.basename(filename)) + full_path = os.path.join(os.getcwd(), filename) + else: + full_path = os.path.join(self.templates_dir, + os.path.basename(filename)) except KeyError: try: