Skip to content

Commit

Permalink
Converted error for non appearing click boxes from exception to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello committed May 9, 2024
1 parent 8a2d0ec commit 3e2ac6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PlumedToHTML/PlumedToHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import pathlib
import zipfile
import warnings
from lxml import etree
from io import StringIO
from bs4 import BeautifulSoup
Expand Down Expand Up @@ -251,7 +252,7 @@ def get_html( inpt, name, outloc, tested, broken, plumedexe, actions=set({}) ) :
for val in soup.find_all("b") :
if "onclick" in val.attrs.keys() :
vallabels = val.attrs["onclick"].split("\"")
if not soup.find("span", {"id": vallabels[3]}) : raise Exception("Generated html is invalid as label hidden box for label " + vallabels[3] + " is missing")
if not soup.find("span", {"id": vallabels[3]}) : warnings.warn("Problems with generated as label hidden box for label " + vallabels[3] + " is missing")
if not soup.find("div", {"id": "value_details_" + vallabels[1]}) : raise Exception("Generated html is invalid as there is no place to show data for " + vallabell[1])

# Now check the togglers
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name='PlumedToHTML',
version='0.56',
version='0.57',
author="Gareth Tribello",
author_email="[email protected]",
description="A package for creating pretified HTML for PLUMED files",
Expand Down

0 comments on commit 3e2ac6d

Please sign in to comment.