Commits

Rodrigo Bistolfi committed 9a2c5ba

Join "/dev" to cdrom devices in list_cdroms

Comments (0)

Files changed (1)

vinstall/backend/media.py

     file_handler = open(proc_info)
     data = file_handler.read()
     file_handler.close()
-    return re.findall(r'^drive name:\s*([hs]d[a-z]|s[rg]\d*)', data, re.M)
-
+    cdroms = re.findall(r'^drive name:\s*([hs]d[a-z]|s[rg]\d*)', data, re.M)
+    return ( os.path.join("/dev", i) for i in cdroms )
 
 def list_partitions(proc_partitions_info=PARTITIONS):
     """List the partitions present in the system by parsing /proc/partitions.
             stdout=subprocess.PIPE)
     data = popen.stdout.read()
     popen.stdout.close()
-    print data
     return re.findall(r'Disk (/dev/[sh]d[a-z]):\s*(\d+\.\d+ GB)', data)