mirror of
https://github.com/GNS3/gns3-registry.git
synced 2024-12-19 04:47:54 +00:00
Fix check.py - regex uses whitespace as word delimiter
This commit is contained in:
parent
044d81873d
commit
7915540ac6
@ -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
|
||||||
|
2
check.py
2
check.py
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user