Commit 9c8b1e6f authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

make an error condition more specific

Thanks to Adriaan Vuik for reporting.
parent 789a575d
......@@ -466,7 +466,7 @@ class SparseSolver(object):
"is not implemented yet.")
for lead in sys.leads:
if not hasattr(lead, 'modes'):
if not hasattr(lead, 'modes') and hasattr(lead, 'selfenergy'):
# TODO: fix this
raise NotImplementedError("ldos for leads with only "
"self-energy is not implemented yet.")
......
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