Skip to content

Commit

Permalink
bug fix virtual compliance report (#4303)
Browse files Browse the repository at this point in the history
Co-authored-by: ring630 <@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ring630 and pre-commit-ci[bot] committed Feb 29, 2024
1 parent 4d6cd6c commit 0fabb06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyaedt/generic/compliance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path
from pathlib import Path
import time

from pyaedt.generic.design_types import get_pyaedt_app
Expand Down Expand Up @@ -298,6 +299,10 @@ def project_file(self):
def project_file(self, val):
self._project_file = val

@property
def project_name(self):
return Path(self.project_file).stem

@property
def use_portrait(self):
return self._use_portrait
Expand Down Expand Up @@ -886,7 +891,7 @@ def create_compliance_report(self, file_name="compliance_test.pdf", close_projec
report.add_toc()
output = report.save_pdf(self._output_folder, file_name=file_name)
if close_project:
self._desktop_class.odesktop.CloseProject(self._project_file)
self._desktop_class.odesktop.CloseProject(self.project_name)
if output:
self._desktop_class.logger.info(f"Report has been saved in {output}")
return output

0 comments on commit 0fabb06

Please sign in to comment.