mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 21:35:48 +01:00
skip osx detection if identifier is not set
This commit is contained in:
parent
049e7b202b
commit
afab0395d3
1 changed files with 4 additions and 4 deletions
|
|
@ -26,8 +26,8 @@ class Device(_Device):
|
|||
VENDOR_NAME = ''
|
||||
PRODUCT_NAME = ''
|
||||
|
||||
OSX_NAME_MAIN_MEM = ''
|
||||
OSX_NAME_CARD_MEM = ''
|
||||
OSX_NAME_MAIN_MEM = None
|
||||
OSX_NAME_CARD_MEM = None
|
||||
|
||||
MAIN_MEMORY_VOLUME_LABEL = ''
|
||||
STORAGE_CARD_VOLUME_LABEL = ''
|
||||
|
|
@ -207,9 +207,9 @@ def get_dev_node(lines, loc):
|
|||
break
|
||||
|
||||
for i, line in enumerate(lines):
|
||||
if line.strip().endswith('<class IOMedia>') and self.OSX_NAME_MAIN_MEM in line:
|
||||
if self.OSX_NAME_MAIN_MEM is not None and line.strip().endswith('<class IOMedia>') and self.OSX_NAME_MAIN_MEM in line:
|
||||
get_dev_node(lines[i+1:], 'main')
|
||||
if line.strip().endswith('<class IOMedia>') and self.OSX_NAME_CARD_MEM in line:
|
||||
if self.OSX_NAME_CARD_MEM is not None and line.strip().endswith('<class IOMedia>') and self.OSX_NAME_CARD_MEM in line:
|
||||
get_dev_node(lines[i+1:], 'card')
|
||||
if len(names.keys()) == 2:
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in a new issue