Commit 9c17de17 authored by Fabrice Allain's avatar Fabrice Allain
Browse files

Error printing revision in ariaec/setup.py

parent e38c7580
No preview for this file type
No preview for this file type
......@@ -266,7 +266,7 @@ assign (resid {res1} and name o) (resid {res2} and name hn) 1.8 {dminus} {dplus
else:
if hb_type != "main":
LOG.error("Wrong longrange hbond type given. Default "
"option used (main)")
"option used (main)")
# First residue = donor for a backbone hydrogen bond (N-H...O=C)
outfile.write('''\
assign (resid {res1} and name o) (resid {res2} and name n) 2.8 {dminus} {dplus}
......@@ -713,24 +713,23 @@ class AriaEcXMLConverter(AriaXMLConverter):
try:
self._pickler.dump(self.molecule, self._mol_set[
'output'])
self._pickler.dump(self.molecule, self._mol_set['output'])
except Exception as msg:
LOG.error("Error writing xml seq file : %s", msg)
LOG.critical("Error for writing xml seq file %s: %s",
self._mol_set['output'], msg)
raise
return self._mol_set['output']
def write_ariaproject(self, aria_template, seqfile, dist_files, tbl_files,
desc=""):
def write_ariaproject(self, aria_template, seqfile, dist_files, tbl_files):
"""
Generate ariaproject.xml file
:param aria_template: ariaproject.xml template path
:param seqfile:
:param dist_files:
:param tbl_files:
:param desc:
:return:
"""
LOG.info("Loading aria template file %s", aria_template)
......@@ -740,12 +739,12 @@ class AriaEcXMLConverter(AriaXMLConverter):
module_directory="/tmp/mako_modules")
try:
t = open(templatepath, 'r')
with open(templatepath, 'r'):
pass
except Exception as msg:
sys.exit("""Can't open "%s" file. %s""" % (templatepath, msg))
aria_project_template = t.read()
t.close()
LOG.critical("""Can't open template file "%s". %s""" %
templatepath, msg)
raise
aria_project_dict = {}
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -163,8 +163,7 @@ class AriaEcSetup:
# ---------------------- ARIA XML project file ----------------------- #
self.converter.write_ariaproject(self.settings.template,
xmlseq_file, dist_files, tbl_files,
desc="_".join(sorted(self.allresmap.keys())))
xmlseq_file, dist_files, tbl_files)
# ------------------------------ others ------------------------------ #
self.write_optional_files()
......
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment