Fixed warnings when printing a schematic variant.

We use a temporal copy of the schematic in a temporal dir.
So now we add a dummy .pro file to avoid warnings.
This commit is contained in:
Salvador E. Tropea 2020-09-10 12:54:43 -03:00
parent c522fa003e
commit 709d6facb9
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ class PDF_Sch_PrintOptions(VariantOptions):
# Save it to a temporal dir
sch_dir = mkdtemp(prefix='tmp-kibot-pdf_sch_print-')
fname = GS.sch.save_variant(sch_dir)
# Create a dummy project file to avoid warnings
prj_file = os.path.join(sch_dir, GS.sch_basename+'.pro')
f = open(prj_file, 'wt')
f.close()
sch_file = os.path.join(sch_dir, fname)
else:
sch_dir = None