Skip to content

Commit

Permalink
catia/claudia: fix startup when a2j not present
Browse files Browse the repository at this point in the history
Consider this code:
```
a = None
print(a and a.b)
```
This evaluates to None and not to False.

Closes: #274
  • Loading branch information
gerion0 authored and falkTX committed May 10, 2020
1 parent 9324d24 commit bf0869c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/catia.py
Expand Up @@ -1009,7 +1009,7 @@ def menuA2JBridge(self, started):
if gDBus.jack and not gDBus.jack.IsStarted():
self.ui.act_tools_a2j_start.setEnabled(False)
self.ui.act_tools_a2j_stop.setEnabled(False)
self.ui.act_tools_a2j_export_hw.setEnabled(gDBus.a2j and not gDBus.a2j.is_started())
self.ui.act_tools_a2j_export_hw.setEnabled(bool(gDBus.a2j) and not gDBus.a2j.is_started())
else:
self.ui.act_tools_a2j_start.setEnabled(not started)
self.ui.act_tools_a2j_stop.setEnabled(started)
Expand Down
2 changes: 1 addition & 1 deletion src/claudia.py
Expand Up @@ -1515,7 +1515,7 @@ def menuA2JBridge(self, started):
if not gDBus.jack.IsStarted():
self.ui.act_tools_a2j_start.setEnabled(False)
self.ui.act_tools_a2j_stop.setEnabled(False)
self.ui.act_tools_a2j_export_hw.setEnabled(gDBus.a2j and not gDBus.a2j.is_started())
self.ui.act_tools_a2j_export_hw.setEnabled(bool(gDBus.a2j) and not gDBus.a2j.is_started())
else:
self.ui.act_tools_a2j_start.setEnabled(not started)
self.ui.act_tools_a2j_stop.setEnabled(started)
Expand Down

0 comments on commit bf0869c

Please sign in to comment.