From 72cc33cb7ed75a61bdb27b05d5cce271d82863ed Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 14 Apr 2019 18:48:54 -0700 Subject: [PATCH] Only show destination device, not all devices --- .bin/Scripts/functions/ufd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/ufd.py b/.bin/Scripts/functions/ufd.py index 7c7a9b48..7753d88a 100644 --- a/.bin/Scripts/functions/ufd.py +++ b/.bin/Scripts/functions/ufd.py @@ -200,12 +200,14 @@ def show_selections(args, sources, ufd_dev, ufd_sources): cmd = [ 'lsblk', '--nodeps', '--noheadings', '--output', 'NAME,TRAN,SIZE,VENDOR,MODEL,SERIAL', + ufd_dev, ] result = run_program(cmd, check=False, encoding='utf-8', errors='ignore') print_standard(result.stdout.strip()) cmd = [ 'lsblk', '--noheadings', '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', + ufd_dev, ] result = run_program(cmd, check=False, encoding='utf-8', errors='ignore') for line in result.stdout.splitlines()[1:]: @@ -246,8 +248,7 @@ def verify_ufd(dev_path): try: ufd_dev = find_path(dev_path) except FileNotFoundError: - print_error('ERROR: UFD device not found: {}'.format( - args['--ufd-device'])) + print_error('ERROR: UFD device not found: {}'.format(dev_path)) abort(False) if not is_valid_path(ufd_dev, 'UFD'):