Cosmetic: pmb.helpers.devices.list -> .list_codenames (!1740)

Rename pmb.helpers.devices.list() to
pmb.helpers.devices.list_codenames(). Python already has a list()
function, so we name our function to make the calls to the codenames
listing function inside pmb/helpers/devices.py less confusing.
This commit is contained in:
Oliver Smith 2019-01-09 08:07:27 +01:00
parent e468d51dae
commit accff27dc3
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 4 additions and 4 deletions

View File

@ -217,7 +217,7 @@ def ask_for_device_nonfree(args, device):
def ask_for_device(args):
devices = sorted(pmb.helpers.devices.list(args))
devices = sorted(pmb.helpers.devices.list_codenames(args))
logging.info("Target device (either an existing one, or a new one for"
" porting).")
logging.info("Available (" + str(len(devices)) + "): " +

View File

@ -21,7 +21,7 @@ import glob
import pmb.parse
def list(args):
def list_codenames(args):
"""
Get all devices, for which aports are available
:returns: ["first-device", "second-device", ...]
@ -38,7 +38,7 @@ def list_apkbuilds(args):
:returns: { "first-device": {"pkgname": ..., "pkgver": ...}, ... }
"""
ret = {}
for device in list(args):
for device in list_codenames(args):
apkbuild_path = args.aports + "/device/device-" + device + "/APKBUILD"
ret[device] = pmb.parse.apkbuild(args, apkbuild_path)
return ret
@ -49,6 +49,6 @@ def list_deviceinfos(args):
:returns: { "first-device": {"name": ..., "screen_width": ...}, ... }
"""
ret = {}
for device in list(args):
for device in list_codenames(args):
ret[device] = pmb.parse.deviceinfo(args, device)
return ret