Ejemplo n.º 1
0
 def wrapper(*args):
     try:
         function(*args)
     except FileNotFoundError:
         Errors.i_title("Invalid `scrapes` directory structure.")
         logging.critical("AN ERROR HAS OCCURED WHILE PROCESSING SCRAPE DATA.")
         logging.critical("Invalid `scrapes` directory structure.\n")
         logging.critical("ABORTING URS.\n")
         quit()
Ejemplo n.º 2
0
 def wrapper(*args):
     try:
         return function(*args)
     except ValueError:
         Errors.i_title("Scrape data is not located within the `scrapes` directory.")
         logging.critical("AN ERROR HAS OCCURRED WHILE PROCESSING SCRAPE DATA.")
         logging.critical("Scrape data is not located within the `scrapes` directory.")
         logging.critical("ABORTING URS.\n")
         quit()
     except TypeError:
         Errors.i_title("Invalid file format. Try again with a valid JSON file.")
         logging.critical("AN ERROR HAS OCCURRED WHILE PROCESSING SCRAPE DATA.")
         logging.critical("Invalid file format.")
         logging.critical("ABORTING URS.\n")
         quit()