mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-22 13:30:36 +01:00
24 lines
396 B
Python
24 lines
396 B
Python
'''
|
|
Module of Linux API for plyer.devicename.
|
|
'''
|
|
|
|
import socket
|
|
from sbapp.plyer.facades import DeviceName
|
|
|
|
|
|
class LinuxDeviceName(DeviceName):
|
|
'''
|
|
Implementation of Linux DeviceName API.
|
|
'''
|
|
|
|
def _get_device_name(self):
|
|
hostname = socket.gethostname()
|
|
return hostname
|
|
|
|
|
|
def instance():
|
|
'''
|
|
Instance for facade proxy.
|
|
'''
|
|
return LinuxDeviceName()
|