Skip to content

Commit

Permalink
PwParser: parse the standard output even if xml file is missing
Browse files Browse the repository at this point in the history
The standard output will still contain useful information and if we
return straight away after detecting the missing the xml file, the
returned output parameters will be empty and useless to the user.
  • Loading branch information
sphuber committed May 9, 2018
1 parent 1dad61a commit f26cbd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aiida_quantumespresso/parsers/pw.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def parse_with_retrieved(self, retrieved):
# The xml file is required for parsing
if not self._calc._DATAFILE_XML_BASENAME in list_of_files:
self.logger.error("The xml output file '{}' was not found but is required".format(self._calc._DATAFILE_XML_BASENAME))
return False, ()
successful = False
xml_file = None
else:
xml_file = os.path.join(out_folder.get_abs_path('.'), self._calc._DATAFILE_XML_BASENAME)

out_file = os.path.join(out_folder.get_abs_path('.'), self._calc._OUTPUT_FILE_NAME)
xml_file = os.path.join(out_folder.get_abs_path('.'), self._calc._DATAFILE_XML_BASENAME)

# Call the raw parsing function
parsing_args = [out_file, parameters, parser_opts, xml_file, dir_with_bands]
Expand Down

0 comments on commit f26cbd8

Please sign in to comment.