On Tue, 25 Feb 2025 at 10:58, Christos Gavros via lists.openembedded.org <[email protected]> wrote: > + # if the last line of local.conf in newbuilddir is not empty and > does not end with newline then add one > + localconf_path = newbuilddir + "/conf/local.conf" > + with open(localconf_path, "r+", encoding="utf-8") as f: > + last_line = None > + for line in f: > + last_line = line
You can replace this with 'last_line = f.readlines()[-1]'. Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#211869): https://lists.openembedded.org/g/openembedded-core/message/211869 Mute This Topic: https://lists.openembedded.org/mt/111374750/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
