Skip to content

Commit

Permalink
sanity check: ensure a valid parameter is passed to add_warcs
Browse files Browse the repository at this point in the history
  • Loading branch information
anarcat committed Nov 13, 2018
1 parent 6d9122e commit 9e9eb2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pywb/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ def add_warcs(self, warcs, method='copy'):
elif method == 'symlink':
os.symlink(filename, os.path.join(self.archive_dir,
os.path.basename(filename)))
else:
elif method == 'copy':
shutil.copy2(filename, self.archive_dir)
else:
raise NotImplementedError('unknown method name: %s' % method)
full_paths.append(os.path.join(self.archive_dir, filename))

self._index_merge_warcs(full_paths, self.DEF_INDEX_FILE)
Expand Down

0 comments on commit 9e9eb2e

Please sign in to comment.