[Dexter] Account for another no-lineno scenario
authorJeremy Morse <jeremy.morse@sony.com>
Fri, 1 Nov 2019 13:41:56 +0000 (13:41 +0000)
committerJeremy Morse <jeremy.morse@sony.com>
Fri, 1 Nov 2019 13:41:56 +0000 (13:41 +0000)
This is another part of Dexter that had never seen a missing source
location before, now newly turning up on Darwin.

debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py

index e6422d1..769c214 100644 (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: