/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: teddy at recompile
  • Date: 2020-01-12 01:42:09 UTC
  • Revision ID: teddy@recompile.se-20200112014209-ktr3acloxzbmhbnt
mandos-ctl: Add DBussy support

Add support in mandos-ctl for the "DBussy" Python D-Bus module.  Use
it by default, if it is available.

* mandos-ctl: Try to import the "dbussy" and its high-level module
  "ravel".
  (main): Use DBussy if import succeeded.
  (dbussy_adapter): New.
  (Test_dbussy_adapter_SystemBus): New test class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
 
90
90
locale.setlocale(locale.LC_ALL, "")
91
91
 
92
 
version = "1.8.11"
 
92
version = "1.8.9"
93
93
 
94
94
 
95
95
def main():
497
497
                             self.properties_iface, interface, key,
498
498
                             value)
499
499
 
500
 
        def call_method(self, methodname, busname, objectpath,
501
 
                        interface, *args):
502
 
            raise NotImplementedError()
503
 
 
504
 
 
505
500
    class MandosBus(SystemBus):
506
501
        busname_domain = "se.recompile"
507
502
        busname = busname_domain + ".Mandos"
1632
1627
        finally:
1633
1628
            dbus_logger.removeFilter(counting_handler)
1634
1629
 
1635
 
        self.assertNotIsInstance(e.exception, dbus.ConnectFailed)
 
1630
        self.assertNotIsInstance(e, dbus.ConnectFailed)
1636
1631
 
1637
1632
        # Make sure the dbus logger was suppressed
1638
1633
        self.assertEqual(0, counting_handler.count)
1775
1770
            self.call_method(bus, "methodname", "busname",
1776
1771
                             "objectpath", "interface")
1777
1772
 
1778
 
        self.assertNotIsInstance(e.exception, dbus.ConnectFailed)
 
1773
        self.assertNotIsInstance(e, dbus.ConnectFailed)
1779
1774
 
1780
1775
    def test_get_converts_to_correct_exception(self):
1781
1776
        bus = pydbus_adapter.SystemBus(