diff --git a/pmb/install/_install.py b/pmb/install/_install.py index fccb37e9..3359cc05 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -362,6 +362,8 @@ def embed_firmware(args): def sanity_check_sdcard(device): device_name = os.path.basename(device) + if not os.path.exists(device): + raise RuntimeError("{} doesn't exist, is the sdcard plugged?".format(device)) if os.path.isdir('/sys/class/block/{}'.format(device_name)): with open('/sys/class/block/{}/ro'.format(device_name), 'r') as handle: ro = handle.read()