Initial integration of behem0th.

This commit is contained in:
Christoph Heiss 2017-03-01 21:56:29 +01:00
parent 5188457be5
commit 7f067f40e9
4 changed files with 31 additions and 3 deletions

View file

@ -6,6 +6,8 @@ import struct
import socket
import fcntl
import subprocess
import urllib
class HostnameNotChangedError(PermissionError):
def __init__(self):
@ -82,6 +84,10 @@ def get_ip_address(ifname=None):
return ip_address
def get_ip_from_url(url):
return urllib.parse.urlsplit(url).netloc.split(':')[0]
def play_sound(path):
if is_linux() or is_darwin():
try: