mirror of
https://github.com/saymrwulf/zipline.git
synced 2026-05-14 20:58:10 +00:00
MAINT: Ensure at least one filter was passed to bundle clean
This commit is contained in:
parent
797b8e2e74
commit
b2640da656
1 changed files with 6 additions and 2 deletions
|
|
@ -182,8 +182,9 @@ class BadClean(click.ClickException, ValueError):
|
|||
"""
|
||||
def __init__(self, before, after, keep_last):
|
||||
super(BadClean, self).__init__(
|
||||
'Cannot pass a combination of `before` and `after` with'
|
||||
'`keep_last`. Got: before=%r, after=%r, keep_n=%r\n' % (
|
||||
'Cannot pass a combination of `before` and `after` with '
|
||||
'`keep_last`. Must pass one. '
|
||||
'Got: before=%r, after=%r, keep_last=%r\n' % (
|
||||
before,
|
||||
after,
|
||||
keep_last,
|
||||
|
|
@ -578,6 +579,9 @@ def _make_bundle_core():
|
|||
if e.errno != errno.ENOENT:
|
||||
raise
|
||||
raise UnknownBundle(name)
|
||||
|
||||
if before is after is keep_last is None:
|
||||
raise BadClean(before, after, keep_last)
|
||||
if ((before is not None or after is not None) and
|
||||
keep_last is not None):
|
||||
raise BadClean(before, after, keep_last)
|
||||
|
|
|
|||
Loading…
Reference in a new issue