Fix check.py - regex uses whitespace as word delimiter

This commit is contained in:
Bernhard Ehlers 2019-01-14 00:17:02 +01:00
parent 044d81873d
commit 7915540ac6
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ Check appliance files
python check.py python check.py
python3 check_urls.py python3 check_urls.py
if `imagemagick` is installed, it will be used to check the symbol properties. If `imagemagick` is installed, it will be used to check the symbol properties.
Otherwise an (experimental) internal function will do that. Otherwise an (experimental) internal function will do that.
Create a new appliance Create a new appliance

View File

@ -105,7 +105,7 @@ unit2px = {'cm': 35.43307, 'mm': 3.543307, 'in': 90.0,
def svg_get_height(filename): def svg_get_height(filename):
with open(filename, 'r') as image_file: with open(filename, 'r') as image_file:
image_data = image_file.read() image_data = image_file.read()
match = re.search('<svg[^>]* height="([^"]+)"', image_data) match = re.search('<svg[^>]*\sheight="([^"]+)"', image_data)
if not match: if not match:
print("{}: can't determine the image height".format(filename)) print("{}: can't determine the image height".format(filename))
sys.exit(1) sys.exit(1)