From 95f4877862e8edcc63895820bfed4a9992dccb2f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 15 Apr 2019 23:04:37 -0700 Subject: [PATCH] Reordered functions --- .bin/Scripts/functions/ufd.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/functions/ufd.py b/.bin/Scripts/functions/ufd.py index 344c273d..9a17ea64 100644 --- a/.bin/Scripts/functions/ufd.py +++ b/.bin/Scripts/functions/ufd.py @@ -60,7 +60,6 @@ def confirm_selections(args): def copy_source(source, items, overwrite=False): """Mount source and copy items to /mnt/UFD.""" - os.makedirs('/mnt/Source', exist_ok=True) mount(source, '/mnt/Source') for i_source, i_dest in items: i_source = '/mnt/Source{}'.format(i_source) @@ -143,12 +142,6 @@ def mount(mount_source, mount_point): run_program(cmd) -def unmount(mount_point): - """Unmount mount_point.""" - cmd = ['umount', mount_point] - run_program(cmd) - - def prep_device(dev_path, label, use_mbr=False): """Format device in preparation for applying the WizardKit components @@ -312,6 +305,12 @@ def show_selections(args, sources, ufd_dev, ufd_sources): print_standard(' ') +def unmount(mount_point): + """Unmount mount_point.""" + cmd = ['umount', mount_point] + run_program(cmd) + + def verify_sources(args, ufd_sources): """Check all sources and abort if necessary, returns dict.""" sources = OrderedDict()