It is sometimes annoying that pyang throws a FileExistsError if an output file already exists, such as when generating PlantUML code for a YANG module, for example, when the YANG module is updated. Currently, an existing PlantUML file has to be deleted before invoking pyang.
This pull requests adds a new option -O, --overwrite to allow the user to choose to overwrite the output file, if it already exists. By default the option is false and so this change is backwards compatible.
It is sometimes annoying that pyang throws a FileExistsError if an output file already exists, such as when generating PlantUML code for a YANG module, for example, when the YANG module is updated. Currently, an existing PlantUML file has to be deleted before invoking pyang.
This pull requests adds a new option -O, --overwrite to allow the user to choose to overwrite the output file, if it already exists. By default the option is false and so this change is backwards compatible.