--- a/plcopen/plcopen.py Fri Aug 28 15:29:35 2020 +0200
+++ b/plcopen/plcopen.py Mon Aug 31 13:54:08 2020 +0200
@@ -331,12 +331,16 @@
def SaveProject(project, filepath):
- project_file = open(filepath, 'w')
- project_file.write(etree.tostring(
+ content = etree.tostring(
+ assert len(content) != 0 + project_file = open(filepath, 'w') + project_file.write(content)