Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, bus, collection_path=DEFAULT_COLLECTION, session=None):
collection_obj = bus_get_object(bus, collection_path)
self.bus = bus
self.session = session
self.collection_path = collection_path
self.collection_iface = InterfaceWrapper(collection_obj,
COLLECTION_IFACE)
self.collection_props_iface = InterfaceWrapper(collection_obj,
dbus.PROPERTIES_IFACE)
self.collection_props_iface.Get(COLLECTION_IFACE, 'Label',
signature='ss')
def __init__(self, bus, item_path, session=None):
self.item_path = item_path
item_obj = bus_get_object(bus, item_path)
self.session = session
self.bus = bus
self.item_iface = InterfaceWrapper(item_obj, ITEM_IFACE)
self.item_props_iface = InterfaceWrapper(item_obj,
dbus.PROPERTIES_IFACE)
self.item_props_iface.Get(ITEM_IFACE, 'Label', signature='ss')
def lock(self):
"""Locks the collection."""
service_obj = bus_get_object(self.bus, SS_PATH)
service_iface = InterfaceWrapper(service_obj, SERVICE_IFACE)
service_iface.Lock([self.collection_path], signature='ao')
def __init__(self, bus, item_path, session=None):
self.item_path = item_path
item_obj = bus_get_object(bus, item_path)
self.session = session
self.bus = bus
self.item_iface = InterfaceWrapper(item_obj, ITEM_IFACE)
self.item_props_iface = InterfaceWrapper(item_obj,
dbus.PROPERTIES_IFACE)
self.item_props_iface.Get(ITEM_IFACE, 'Label', signature='ss')
def __init__(self, bus, collection_path=DEFAULT_COLLECTION, session=None):
collection_obj = bus_get_object(bus, collection_path)
self.bus = bus
self.session = session
self.collection_path = collection_path
self.collection_iface = InterfaceWrapper(collection_obj,
COLLECTION_IFACE)
self.collection_props_iface = InterfaceWrapper(collection_obj,
dbus.PROPERTIES_IFACE)
self.collection_props_iface.Get(COLLECTION_IFACE, 'Label',
signature='ss')