osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error Python version 3.6 does not support this syntax.


On Tue, 2018-11-27 at 13:50 +0100, srinivasan wrote:
> 
> *        except BluetoothctlError, e:*
> 
I don't have python3.6 available, but I believe the proper syntax is:

except BluetoothctlError as e:
    print(e)

See:
https://docs.python.org/3/tutorial/errors.html?highlight=exception


HTW