Skip to content

Commit

Permalink
[Security] fix draw security problem (#61161) (#61338)
Browse files Browse the repository at this point in the history
* fix draw security problem
  • Loading branch information
wanghuancoder authored Jan 31, 2024
1 parent ff119d0 commit aeaa0ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/paddle/base/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -5568,8 +5568,7 @@ def draw(self, save_path, name, marked_nodes=None, remove_ctr_var=True):
def _convert_to_pdf(dot_file_path):
pdf_save_path = os.path.splitext(dot_file_path)[0] + '.pdf'
exited_code = subprocess.call(
'dot -Tpdf ' + dot_file_path + ' -o ' + pdf_save_path,
shell=True,
['dot', '-Tpdf', dot_file_path, '-o', pdf_save_path]
)
if exited_code != 0:
print('The dot command is needed for creating pdf files.')
Expand Down

0 comments on commit aeaa0ca

Please sign in to comment.