projects
/
pinmux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82c4c67
)
dont make image if no svgwrite module
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 10 Jun 2021 21:17:53 +0000
(22:17 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 10 Jun 2021 21:17:53 +0000
(22:17 +0100)
src/spec/ifaceprint.py
patch
|
blob
|
history
diff --git
a/src/spec/ifaceprint.py
b/src/spec/ifaceprint.py
index 4a4104f41ded15c4acef89733e56dc6e62ec9909..657d9623b63809ba6f17a1034602a027754ad204 100644
(file)
--- a/
src/spec/ifaceprint.py
+++ b/
src/spec/ifaceprint.py
@@
-2,7
+2,6
@@
from copy import deepcopy
from collections import OrderedDict
-import svgwrite
from math import pi
@@
-10,6
+9,12
@@
def create_sv(fname, pins):
"""unsophisticated drawer of an SVG
"""
+ try:
+ import svgwrite
+ except ImportError:
+ print ("WARNING, no SVG image, not producing image %s" % fname)
+ return
+
scale = 15
width = len(pins['pads.north']) * scale
height = len(pins['pads.east']) * scale