aboutsummaryrefslogtreecommitdiff
path: root/examples/modem-watcher-python
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2021-02-13 09:40:05 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-02-13 11:09:59 +0100
commit16d1cf33183d376fa6cb8925e42c77b2e86be2d9 (patch)
tree11fb8bf711963facf0e20e76dbb7837a39418a8e /examples/modem-watcher-python
parent6107774bb21e55028b87a7d3f23762324410543b (diff)
examples: rework imports
Remove unused imports and fix import sorting using isort utility.
Diffstat (limited to 'examples/modem-watcher-python')
-rw-r--r--examples/modem-watcher-python/ModemWatcher.py6
-rwxr-xr-xexamples/modem-watcher-python/modem-watcher-python6
2 files changed, 7 insertions, 5 deletions
diff --git a/examples/modem-watcher-python/ModemWatcher.py b/examples/modem-watcher-python/ModemWatcher.py
index a18725b1..8091d9f3 100644
--- a/examples/modem-watcher-python/ModemWatcher.py
+++ b/examples/modem-watcher-python/ModemWatcher.py
@@ -18,10 +18,10 @@
# Copyright (C) 2014 Aleksander Morgado <aleksander@aleksander.es>
#
-import os, sys, gi
-
+import gi
gi.require_version('ModemManager', '1.0')
-from gi.repository import GLib, GObject, Gio, ModemManager
+from gi.repository import Gio, GLib, GObject, ModemManager
+
"""
The ModemWatcher class is responsible for monitoring ModemManager
diff --git a/examples/modem-watcher-python/modem-watcher-python b/examples/modem-watcher-python/modem-watcher-python
index 40998588..4884beef 100755
--- a/examples/modem-watcher-python/modem-watcher-python
+++ b/examples/modem-watcher-python/modem-watcher-python
@@ -18,10 +18,12 @@
# Copyright (C) 2014 Aleksander Morgado <aleksander@aleksander.es>
#
-import sys, signal
-import ModemWatcher
+import signal
+
from gi.repository import GLib
+import ModemWatcher
+
main_loop = None
watcher = None