maybe a simple improvement can be:
if attach and aeroo_ooo and report_xml.process_sep: # and instead of or #normal process.... ... elif attach or aeroo_ooo and not report_xml.process_sep: # do all stuff in 1 file ...
maybe a simple improvement can be:
if attach and aeroo_ooo and report_ xml.process_ sep: # and instead of or xml.process_ sep:
#normal process....
...
elif attach or aeroo_ooo and not report_
# do all stuff in 1 file
...