This commit is contained in:
Kovid Goyal 2012-08-22 16:42:24 +05:30
parent 179d4781f0
commit b63dd79142
2 changed files with 6 additions and 1 deletions

View File

@ -487,7 +487,8 @@ class DevicePlugin(Plugin):
Set the device name in the driveinfo file to 'name'. This setting will Set the device name in the driveinfo file to 'name'. This setting will
persist until the file is re-created or the name is changed again. persist until the file is re-created or the name is changed again.
Non-disk devices will ignore this request. Non-disk devices should implement this method based on the location
codes returned by the get_device_information() method.
''' '''
pass pass

View File

@ -204,6 +204,10 @@ class MTP_DEVICE(MTPDeviceBase):
def get_device_information(self, end_session=True): def get_device_information(self, end_session=True):
d = self.dev.data d = self.dev.data
dv = d.get('device_version', '') dv = d.get('device_version', '')
for sid, location_code in ( (self._main_id, 'main'), (self._carda_id,
'A'), (self._cardb_id, 'B')):
if sid is None: continue
# TODO: Implement the drive info dict
return (self.current_friendly_name, dv, dv, '') return (self.current_friendly_name, dv, dv, '')
@same_thread @same_thread