Open dmacduff opened 2 years ago
I would label this bug
if I could.
The best fix for this might be to update the code to handle an absent background image file, and allow themification to proceed. E.g.
try:
shutil.copyfile(bg_path, bg_usr_share_path)
except FileNotFoundError as err:
logger.warning("FileNotFoundError error: {0}".format(err))
exit()
## Uncomment the logger warning and comment out above warning and exit if you want themes to proceed in the absence of a background image
# print("Caught this exception, but still want it to error out because a theme is no good without a background!", file=sys.stderr)
#logger.error("Could not find background file " + bg_path + "FileNotFoundError error: {0}".format(err))
#raise
However, the desktop background code could probably use some more extensive refactoring (based on the TODO in the set_background function description), so perhaps best to leave this as an exercise for later.
Use an image from the Library of Congress (public domain) for this theme. Update README.md
accordingly.
wget https://tile.loc.gov/storage-services/service/pnp/cph/3b30000/3b35000/3b35100/3b35121r.jpg -O avengers.jpg
Summary
make_theme.py
fails when run with--theme avengers
due to no avengers.jpg file.Error trace: