pep8 fixes

This commit is contained in:
Thomas Vander Stichele
2012-11-10 21:53:16 +00:00
parent 22d299c0ba
commit d248508f11

View File

@@ -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 = []