Commit Graph
9 Commits
Author SHA1 Message Date
Yegor Yefremov 297a8c85ae examples: sms: resolve PEP8 issues
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.
2021-02-25 14:14:55 +01:00
Yegor Yefremov cc07d21410 examples: network-scan: get rid of global variables
Move the code into the main() routine.
2021-02-24 14:59:48 +01:00
Yegor Yefremov 69926d9335 examples: modem-watcher: get rid of global variables
Move the code into the main() routine and pass main_loop as
a parameter to the signal handler.
2021-02-15 21:10:34 +01:00
Yegor Yefremov e685ce9ce5 examples: ModemWatcher: convert comments in the doc strings
Move comments under the class and method definitions.

Also rework boolean handling.
2021-02-15 21:10:26 +01:00
Yegor Yefremov 3a32409000 examples: network-scan: enable modem before the network scan
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)
2021-02-14 23:35:54 +01:00
Yegor Yefremov c7d0defdde examples: network-scan: resolve PEP8 issues
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.
2021-02-14 23:35:49 +01:00
Yegor Yefremov 16d1cf3318 examples: rework imports
Remove unused imports and fix import sorting using isort utility.
2021-02-13 11:09:59 +01:00
Yegor Yefremov dcb627a61f trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-06-04 14:11:16 -05:00
Yegor Yefremov 84bdcb04ed trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-01-07 09:40:05 -06:00