Commit e379e298 authored by Berk Onat's avatar Berk Onat

Fix NoneType topology format for ASE support.

parent 0055897f
......@@ -3730,13 +3730,14 @@ class MDDataAccess(object):
"""
ioformat = None
_format = file_format.replace('-', '_')
module_handler = None
module_name = ase_io.formats.format2modulename.get(file_format, _format)
try:
module_handler = ase_io.formats.import_module('ase.io.' + module_name)
except ImportError:
pass
if file_format:
_format = file_format.replace('-', '_')
module_name = ase_io.formats.format2modulename.get(file_format, _format)
try:
module_handler = ase_io.formats.import_module('ase.io.' + module_name)
except ImportError:
pass
if module_handler:
module_read = getattr(module_handler, 'read_' + _format, None)
if module_read and not inspect.isgeneratorfunction(module_read):
......
Markdown is supported
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