archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.95k stars 514 forks source link

Incorrect example in archinstall/docs/examples/python.rst #1603

Open speshuric opened 1 year ago

speshuric commented 1 year ago

Below the code from archinstall/docs/examples/python.rst

import archinstall

all_drives = archinstall.list_drives()
print(all_drives)

Now archinstall does not contain list_drives() function so this code doesn't work anymore. Personally, I currently use the following code to test import of archinstall:

import archinstall

archinstall.do_countdown()

This is simpler and clearer than list drives. But if we need to keep current behavior it can be:

import archinstall

all_drives = archinstall.all_blockdevices(partitions=False)
print(all_drives.keys())

I easily can fix it in the trivial PR but what should I prefer?

Torxed commented 1 year ago

Thanks for finding this one, I'd prefer the last example as it's closest to the initial example :) A PR would be very welcome!