From 40e3fc5cbd18bd96ba008860a4780f4a55f3bd54 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoschek Date: Sun, 21 Jul 2024 21:23:49 +0200 Subject: [PATCH] CheckRange - Thanks to Dmitriy Kovalev --- wbackup_zfs/wbackup_zfs.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wbackup_zfs/wbackup_zfs.py b/wbackup_zfs/wbackup_zfs.py index 573c13e4..13e1ccb6 100755 --- a/wbackup_zfs/wbackup_zfs.py +++ b/wbackup_zfs/wbackup_zfs.py @@ -1876,6 +1876,20 @@ def __call__(self, parser, namespace, values, option_string=None): ############################################################################# +# Copied from https://gist.github.com/dmitriykovalev/2ab1aa33a8099ef2d514925d84aa89e7/30961300d3f8192f775709c06ff9a5b777475adf +# Written by Dmitriy Kovalev +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. class CheckRange(argparse.Action): ops = {'inf': operator.gt, 'min': operator.ge,