On Mon, 15 Dec 2025 at 11:33, Corentin Guillevic via
lists.openembedded.org
<[email protected]> wrote:
> +    if 'uri' in r_remote:
> +        r_name = ''
> +
> +        if 'remotes' in r_remote:
> +            if not 'bitbake-setup-uri' in r_remote['remotes']:
> +                r_name = 'bitbake-setup-uri'
> +            else:
> +                idx = 1
> +                while 'bitbake-setup-uri_{}'.format(idx) in 
> r_remote['remotes']:
> +                    idx += 1
> +                r_name = 'bitbake-setup-uri_{}'.format(idx)
> +        else:
> +            r_name = 'bitbake-setup-uri'

This should not be using 'bitbake-setup-uri-xxx', just 'origin-xxx'.

Also I think it would be more pythonic to avoid incrementing an
integer by hand as shown here:

https://stackoverflow.com/questions/9884213/looping-from-1-to-infinity-in-python

e.g.

import itertools
for i in itertools.count(start=1):
    if there_is_a_reason_to_break(i):
        break

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#227729): 
https://lists.openembedded.org/g/openembedded-core/message/227729
Mute This Topic: https://lists.openembedded.org/mt/116790088/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to