Client: Python
Patch: Nathaniel Cook
When generating python code the generator correctly creates _init.py file for each directory. If the __init_.py file has contents it is always overwritten. This usually isn't a problem unless using the -out flag, then there is a potential to erase non generated code.
while (true) {
// TODO: Do better error checking here.
MKDIR(package_dir_.c_str());
- std::ofstream init_py((package_dir_+"/__init__.py").c_str());
+ std::ofstream init_py((package_dir_+"/__init__.py").c_str(), std::ios_base::app);
init_py.close();
if (module.empty()) {
break;