diff options
| author | Tom Smeding <tom.smeding@gmail.com> | 2020-05-21 20:06:33 +0200 |
|---|---|---|
| committer | Tom Smeding <tom.smeding@gmail.com> | 2020-05-21 20:06:33 +0200 |
| commit | 94a2d7e72f9cf006640bd77db286c070706384fc (patch) | |
| tree | dd8a41392243b9e2e8485f91445b9429cd9b0a0d | |
| parent | c1872f0fc911c5f27ae774af0155af4787e9ca8b (diff) | |
Don't crash if a sink input doesn't have a name
| -rw-r--r-- | pa.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -41,9 +41,12 @@ class SinkInput: self._i = pitem def name(self): - name = self._i.ch["properties"].ch["media.name"].value - if "application.process.binary" in self._i.ch["properties"].ch: - name += " (" + self._i.ch["properties"].ch["application.process.binary"].value + ")" + try: + name = self._i.ch["properties"].ch["media.name"].value + if "application.process.binary" in self._i.ch["properties"].ch: + name += " (" + self._i.ch["properties"].ch["application.process.binary"].value + ")" + except Exception as e: + return "???" return name def default(self): |
