summaryrefslogtreecommitdiff
path: root/network/__init__.py
blob: 38121735309001733ef85d52e6ab8cb15c67ba34 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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