Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit bf0869c

Browse files
gerion0falkTX
authored andcommitted
catia/claudia: fix startup when a2j not present
Consider this code: ``` a = None print(a and a.b) ``` This evaluates to None and not to False. Closes: #274
1 parent 9324d24 commit bf0869c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/catia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def menuA2JBridge(self, started):
10091009
if gDBus.jack and not gDBus.jack.IsStarted():
10101010
self.ui.act_tools_a2j_start.setEnabled(False)
10111011
self.ui.act_tools_a2j_stop.setEnabled(False)
1012-
self.ui.act_tools_a2j_export_hw.setEnabled(gDBus.a2j and not gDBus.a2j.is_started())
1012+
self.ui.act_tools_a2j_export_hw.setEnabled(bool(gDBus.a2j) and not gDBus.a2j.is_started())
10131013
else:
10141014
self.ui.act_tools_a2j_start.setEnabled(not started)
10151015
self.ui.act_tools_a2j_stop.setEnabled(started)

src/claudia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,7 @@ def menuA2JBridge(self, started):
15151515
if not gDBus.jack.IsStarted():
15161516
self.ui.act_tools_a2j_start.setEnabled(False)
15171517
self.ui.act_tools_a2j_stop.setEnabled(False)
1518-
self.ui.act_tools_a2j_export_hw.setEnabled(gDBus.a2j and not gDBus.a2j.is_started())
1518+
self.ui.act_tools_a2j_export_hw.setEnabled(bool(gDBus.a2j) and not gDBus.a2j.is_started())
15191519
else:
15201520
self.ui.act_tools_a2j_start.setEnabled(not started)
15211521
self.ui.act_tools_a2j_stop.setEnabled(started)

0 commit comments

Comments
 (0)