pep8 fixes
This commit is contained in:
@@ -24,12 +24,14 @@ import os
|
||||
|
||||
from morituri.common import log
|
||||
|
||||
|
||||
def _listify(listOrString):
|
||||
if type(listOrString) == str:
|
||||
return [listOrString, ]
|
||||
|
||||
return listOrString
|
||||
|
||||
|
||||
def getAllDevicePaths():
|
||||
try:
|
||||
return _getAllDevicePathsPyCdio()
|
||||
@@ -37,6 +39,7 @@ def getAllDevicePaths():
|
||||
log.info('drive', 'Cannot import pycdio')
|
||||
return _getAllDevicePathsStatic()
|
||||
|
||||
|
||||
def _getAllDevicePathsPyCdio():
|
||||
import pycdio
|
||||
import cdio
|
||||
@@ -46,6 +49,7 @@ def _getAllDevicePathsPyCdio():
|
||||
# ticket 102: this cdio call returns a list of str, or a single str
|
||||
return _listify(cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False))
|
||||
|
||||
|
||||
def _getAllDevicePathsStatic():
|
||||
ret = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user