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:
parent
e468d51dae
commit
accff27dc3
|
@ -217,7 +217,7 @@ def ask_for_device_nonfree(args, device):
|
||||||
|
|
||||||
|
|
||||||
def ask_for_device(args):
|
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"
|
logging.info("Target device (either an existing one, or a new one for"
|
||||||
" porting).")
|
" porting).")
|
||||||
logging.info("Available (" + str(len(devices)) + "): " +
|
logging.info("Available (" + str(len(devices)) + "): " +
|
||||||
|
|
|
@ -21,7 +21,7 @@ import glob
|
||||||
import pmb.parse
|
import pmb.parse
|
||||||
|
|
||||||
|
|
||||||
def list(args):
|
def list_codenames(args):
|
||||||
"""
|
"""
|
||||||
Get all devices, for which aports are available
|
Get all devices, for which aports are available
|
||||||
:returns: ["first-device", "second-device", ...]
|
:returns: ["first-device", "second-device", ...]
|
||||||
|
@ -38,7 +38,7 @@ def list_apkbuilds(args):
|
||||||
:returns: { "first-device": {"pkgname": ..., "pkgver": ...}, ... }
|
:returns: { "first-device": {"pkgname": ..., "pkgver": ...}, ... }
|
||||||
"""
|
"""
|
||||||
ret = {}
|
ret = {}
|
||||||
for device in list(args):
|
for device in list_codenames(args):
|
||||||
apkbuild_path = args.aports + "/device/device-" + device + "/APKBUILD"
|
apkbuild_path = args.aports + "/device/device-" + device + "/APKBUILD"
|
||||||
ret[device] = pmb.parse.apkbuild(args, apkbuild_path)
|
ret[device] = pmb.parse.apkbuild(args, apkbuild_path)
|
||||||
return ret
|
return ret
|
||||||
|
@ -49,6 +49,6 @@ def list_deviceinfos(args):
|
||||||
:returns: { "first-device": {"name": ..., "screen_width": ...}, ... }
|
:returns: { "first-device": {"name": ..., "screen_width": ...}, ... }
|
||||||
"""
|
"""
|
||||||
ret = {}
|
ret = {}
|
||||||
for device in list(args):
|
for device in list_codenames(args):
|
||||||
ret[device] = pmb.parse.deviceinfo(args, device)
|
ret[device] = pmb.parse.deviceinfo(args, device)
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue