eject usb setting

This commit is contained in:
langolierz
2020-02-24 19:45:52 +00:00
parent 989e65af28
commit 26ef3d6891
3 changed files with 15 additions and 2 deletions

View File

@@ -82,8 +82,11 @@ class Data(object):
def get_ip_address(self):
ip = subprocess.check_output(['hostname', '-I']).decode('utf-8').split()[0]
return ip
ip_list = subprocess.check_output(['hostname', '-I']).decode('utf-8').split()
if len(ip_list) > 0:
return ip_list[0]
else:
return 'none'
def get_ip_for_osc_client(self):
if self.settings['user_input']['REMOTE_SERVER']['value'] == 'enabled':