Skip to content

Commit 9e9eb2e

Browse files
committed
sanity check: ensure a valid parameter is passed to add_warcs
1 parent 6d9122e commit 9e9eb2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pywb/manager/manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ def add_warcs(self, warcs, method='copy'):
126126
elif method == 'symlink':
127127
os.symlink(filename, os.path.join(self.archive_dir,
128128
os.path.basename(filename)))
129-
else:
129+
elif method == 'copy':
130130
shutil.copy2(filename, self.archive_dir)
131+
else:
132+
raise NotImplementedError('unknown method name: %s' % method)
131133
full_paths.append(os.path.join(self.archive_dir, filename))
132134

133135
self._index_merge_warcs(full_paths, self.DEF_INDEX_FILE)

0 commit comments

Comments
 (0)