Skip to content

networkx.drawing.nx_pydot.write_dot creates empty file if pydot wasn't installed #3865

@miparnisari

Description

@miparnisari

Problem: this code

@open_file(1, mode='w')
def write_dot(G, path):

Is creating the DOT file even before checking if pydot has been installed. If it hasn't, then the resulting DOT file will be an empty file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions