Use autopep8 utility to resolve issues like spaces before brackets
and wrong hanging indentation.
Also treat objects like boolean variables to check whether they are
None or not.
Otherwise we get the following exception:
Traceback (most recent call last):
File "/root/network-scan-python", line 57, in <module>
networks = modem3gpp.scan_sync()
gi.repository.GLib.Error: mm_core_error_quark: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: Cannot scan networks: not enabled yet (8)
Use autopep8 utility to resolve issues like spaces before brackets
and wrong hanging indentation.
Also treat objects like boolean variables to check whether they are
None or not.