[Lldb-commits] [PATCH] D131033: [lldb/crashlog] Fix parsing issue with `procPath`

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 3 14:51:48 PDT 2022


kastiglione added inline comments.


================
Comment at: lldb/examples/python/crashlog.py:472-473
         self.crashlog.process_identifier = json_data['procName']
-        self.crashlog.process_path = json_data['procPath']
+        if 'procPath' in json_data:
+            self.crashlog.process_path = json_data['procPath']
 
----------------
another way of doing this is:

```
self.crashlog.process_path = json_data.get('procPath')
```

`get()` returns `None` if the key doesn't exist.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131033/new/

https://reviews.llvm.org/D131033



More information about the lldb-commits mailing list