[PATCH] Omit /dev/sr* from list-harddrives (#1032500)

Chris Lumens clumens at redhat.com
Mon Dec 2 16:12:28 UTC 2013


> diff --git a/data/command-stubs/list-harddrives-stub b/data/command-stubs/list-harddrives-stub
> index 75e8f89..a0a6d34 100755
> --- a/data/command-stubs/list-harddrives-stub
> +++ b/data/command-stubs/list-harddrives-stub
> @@ -26,7 +26,7 @@ import _ped
>  def main(argv):
>      lst = set()
>  
> -    for dev in filter(lambda d: d.type != parted.DEVICE_DM, parted.getAllDevices()):
> +    for dev in filter(lambda d: d.type != parted.DEVICE_DM and not d.path.startswith("/dev/sr"), parted.getAllDevices()):
>          if dev.path.startswith("/dev/"):
>              path = dev.path[5:]
>          else:

Looks fine.

- Chris


More information about the anaconda-patches mailing list