(self)
Check if the bluetooth controller is available.
Check if the bluetooth controller is available.
Check if the bluetooth controller is available .
def setup(self):
        """Check if the bluetooth controller is available."""
        try:
            subprocess.check_output(["hcitool", "clock"],
                                    stderr=subprocess.STDOUT)
        except subprocess.CalledProcessError:
            raise BackendError("'hcitool clock' returned error. Make sure "
                               "your bluetooth device is powered up with "
                               "'hciconfig hciX up'.")
        except OSError:
            raise BackendError("'hcitool' could not be found, make sure you "
                               "have bluez-utils installed.")
def setup ( self ) : try : subprocess . check_output ( [ "hcitool" , "clock" ] , stderr = subprocess . STDOUT ) except subprocess . CalledProcessError : raise BackendError ( "'hcitool clock' returned error. Make sure " "your bluetooth device is powered up with " "'hciconfig hciX up'." ) except OSError : raise BackendError ( "'hcitool' could not be found, make sure you " "have bluez-utils installed." )