summaryrefslogtreecommitdiff
path: root/network/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'network/__init__.py')
-rw-r--r--network/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/network/__init__.py b/network/__init__.py
new file mode 100644
index 0000000..3812173
--- /dev/null
+++ b/network/__init__.py
@@ -0,0 +1,16 @@
+import warnings
+
+from gi.repository import GLib
+
+# GLib.threads_init() is deprecated, which is awesome, but it prints out an
+# error message which will be confusing to beginners.
+# I don't want to remove this either, as the library still needs to be usable on
+# older systems.
+# So we monkey-patch the warning away.
+_warn = warnings.warn
+warnings.warn = lambda *a, **k: None
+GLib.threads_init()
+warnings.warn = _warn
+
+from network.client import Client
+from network.server import Server