[Dexter] Account for another no-lineno scenario

This is another part of Dexter that had never seen a missing source
location before, now newly turning up on Darwin.
This commit is contained in:
Jeremy Morse
2019-11-01 13:41:56 +00:00
parent e34179aad1
commit 6e217ba3ea

View File

@@ -168,7 +168,8 @@ class DexExpectWatchBase(CommandBase):
for step in step_collection.steps:
loc = step.current_location
if (os.path.exists(loc.path) and os.path.exists(self.path) and
if (loc and os.path.exists(loc.path) and
os.path.exists(self.path) and
os.path.samefile(loc.path, self.path) and
loc.lineno in self.line_range):
try: