pybackive/backive/core/device.py

16 lines
291 B
Python
Raw Normal View History

2019-01-06 17:34:02 +01:00
import os
class Device:
disks_by_uuid = "/dev/disk/by-uuid"
def __init__(self):
pass
@classmethod
def get_device_list(cls):
if os.path.exists(cls.disks_by_uuid):
uuids = os.listdir(cls.disks_by_uuid)
return uuids
return []