1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-31 03:04:12 +02: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,10 +246,8 @@ directory structure expected by pywb
try: try:
filename = templates[template_name] filename = templates[template_name]
if not self.coll_name: if not self.coll_name:
msg = ('To {1} a "{0}" template, you must specify ' + full_path = os.path.join(os.getcwd(), filename)
'a collection name: template <coll> --{1} {0}') else:
raise IOError(msg.format(template_name, verb))
full_path = os.path.join(self.templates_dir, full_path = os.path.join(self.templates_dir,
os.path.basename(filename)) os.path.basename(filename))