1#!/usr/bin/env python3

2#

3# This file is part of Checkbox.

4#

5# Copyright 2018 Canonical Ltd.

6#

7# Authors:

8# Jonathan Cave <jonathan.cave@canonical.com>

9#

10# Checkbox is free software: you can redistribute it and/or modify

11# it under the terms of the GNU General Public License version 3,

12# as published by the Free Software Foundation.

13#

14# Checkbox is distributed in the hope that it will be useful,

15# but WITHOUT ANY WARRANTY; without even the implied warranty of

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

17# GNU General Public License for more details.

18#

19# You should have received a copy of the GNU General Public License

20# along with Checkbox. If not, see <http://www.gnu.org/licenses/>.

21

22 import checkbox_support.bt_helper as bt_helper

23

24 import sys

25

26

27 def main():

28 manager = bt_helper.BtManager()

29 bt_adapter_not_found = True

30 for dev in manager.get_bt_adapters():

31 bt_adapter_not_found = False

32 print(dev._if.object_path.split("/")[-1])

33 return bt_adapter_not_found

34

35

36 if __name__ == "__main__":

37 sys.exit(main())