[PATCH 3/4] get: move check for missing targets to parse_args()

2 views
Skip to first unread message

Rob Browning

unread,
Mar 28, 2026, 3:04:18 PM (12 days ago) Mar 28
to bup-...@googlegroups.com
Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
lib/bup/cmd/get.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/bup/cmd/get.py b/lib/bup/cmd/get.py
index 2c3fe9b0..3c00290c 100644
--- a/lib/bup/cmd/get.py
+++ b/lib/bup/cmd/get.py
@@ -307,6 +307,8 @@ def parse_args(args):
ctx_msg = ' '. join(path_msg(x) for x in pending_method_context)
misuse(f'trailing arguments with no effect: {ctx_msg}')
opt.dst_loc = main_repo_location(opt.remote, misuse)
+ if not opt.target_specs:
+ misuse('no methods specified')
return opt

# FIXME: client error handling (remote exceptions, etc.)
@@ -966,7 +968,4 @@ def main(argv):
git.check_repo_or_die()
if opt.bwlimit:
client.bwlimit = opt.bwlimit
- if not opt.target_specs:
- misuse('no methods specified')
-
return get_everything(opt)
--
2.47.3

Reply all
Reply to author
Forward
0 new messages