summaryrefslogtreecommitdiff
path: root/tools/pyboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-xtools/pyboard.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py
index 7b546b99d..0ce2d291e 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -686,6 +686,10 @@ def filesystem_command(pyb, args, progress_callback=None, verbose=False):
args = args[1:]
try:
if cmd == "cp":
+ if len(args) == 1:
+ raise PyboardError(
+ "cp: missing destination file operand after '{}'".format(args[0])
+ )
srcs = args[:-1]
dest = args[-1]
if dest.startswith(":"):