1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

manager: relax template requirements, allow any collection template to also be added to shared dir

This commit is contained in:
Ilya Kreymer 2015-03-26 19:40:43 -07:00
parent 753300d5ed
commit 6bbbb51f6e

View File

@ -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 <coll> --{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: