Browse Source

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
tags/v0.9.2
Gerion Entrup Filipe Coelho <falktx@falktx.com> 3 years ago
parent
commit
bf0869c111
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/catia.py
  2. +1
    -1
      src/claudia.py

+ 1
- 1
src/catia.py View File

@@ -1009,7 +1009,7 @@ class CatiaMainW(AbstractCanvasJackClass):
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)


+ 1
- 1
src/claudia.py View File

@@ -1515,7 +1515,7 @@ class ClaudiaMainW(AbstractCanvasJackClass):
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)


Loading…
Cancel
Save