Skip to content

Commit

Permalink
owm method for error
Browse files Browse the repository at this point in the history
  • Loading branch information
bitSheriff committed Sep 7, 2023
1 parent 15edd00 commit de5bb75
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shelfslide.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def update_bookLibrary(book_dir,cover_dir, is_git, slide_mode, offlineOnly, clea
book_list = sort_books(book_list, slide_mode)
return book_list

def error_exit(display, text):
logging.error(text)
display.display_logo()
sys.exit(0)

##
# @brief Main function
def main():
Expand Down Expand Up @@ -152,8 +157,7 @@ def main():
if parser.update:
subprocess.run(["git", "pull"])
print("Updated ShelfSlide\n Please restart the application")
display.display_logo()
sys.exit(0)
error_exit(display)

# check if the dryrun flag is set
if parser.dryrun:
Expand Down

0 comments on commit de5bb75

Please sign in to comment.