Commit 866ff6f3 authored by rgaudin's avatar rgaudin
Browse files

Fixed #165: User supplied files (edupi_rsc, logo, css, favicon) checked for...

Fixed #165: User supplied files (edupi_rsc, logo, css, favicon) checked for existence early in the process
parent 112fd8d1
2.0-rc5
* Domain tld changed to .hotstop (was .lan)
* Supplied file (edupi_resource, logo, css, favicon) checked for existence
2.0-rc4
* Use decimal (GB) sizes for SD card selection
* Fixed logger refresh while writing to SD-card
......
......@@ -231,11 +231,15 @@ collection = get_collection(edupi=args.edupi == "yes",
cache_folder = get_cache(args.build_dir)
# how much space is available on the build directory?
avail_space_in_build_dir = get_free_space_in_dir(args.build_dir)
# how much space do we need to build the image?
space_required_to_build = get_required_building_space(
collection, cache_folder, args.size)
# how large should the image be?
required_image_size = get_required_image_size(collection)
try:
# how much space do we need to build the image?
space_required_to_build = get_required_building_space(
collection, cache_folder, args.size)
# how large should the image be?
required_image_size = get_required_image_size(collection)
except FileNotFoundError as exp:
print("Supplied File Not Found: {}".format(exp.filename), file=sys.stderr)
sys.exit(1)
base_image_size = get_content('pibox_base_image')['expanded_size']
if args.size < base_image_size:
......
......@@ -33,6 +33,12 @@ def run_installation(name, timezone, language, wifi_pwd, admin_account, kalite,
"Your system does not matches system requirements:\n{}".format(
"\n".join([" - {}".format(dep) for dep in missing_deps])))
logger.step("Ensure user files are present")
for user_fpath in (edupi_resources, favicon, logo, css):
if user_fpath is not None and not os.path.exists(user_fpath):
raise ValueError("Specified file is not available ({})"
.format(user_fpath))
logger.step("Prepare Image file")
# set image names
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment