Hi Quentin
On Tue, May 3, 2022 at 10:51 AM, Quentin Schulz wrote:

> 
> 
>> +
>> +
>> +
>> +def dunfell_tags(dir):
>> + dunfell_banners = []
>> + for root, dirs, filenames in os.walk(dir):
>> + dunfell_banners = [ name for name in os.listdir(dir) if not
>> name.startswith('3.1') ]
>> + for d in dirs:
>> + if d in dunfell_banners:
>> + dirs.remove(d)
>> +
>> + for filename in filenames:
>> + if filename.endswith('.html'):
>> + with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as
>> f:
>> + current_content = f.read()
>> + with open(os.path.join(root, filename), 'w') as f:
>> + f.write(current_content.replace('<body>', '<body>' +
>> html_content_dunfell))
>> + f.write(current_content.replace('</body>', last_div + '</body>'))
>> + if filename.endswith('.css'):
>> + with open(os.path.join(root, filename), 'r', encoding="ISO-8859-1") as
>> f:
>> + css_content = f.read()
>> + with open(os.path.join(root, filename), 'w') as f:
>> + f.write(css_content.replace(css_content[css_content.find('body
>> {'):css_content.find('}'[0])], 'body {' + css_replacement_content ))
>> + print(dunfell_banners)
> 
> This is all extremely complex just for using a different variable
> depending on the name of the directory.

I wish to ask if your'e referring to the last line of code or this entire 
function, I have actuallly removed the print(dunfell_banners) line

Thanks a lot for reviewing.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56987): https://lists.yoctoproject.org/g/yocto/message/56987
Mute This Topic: https://lists.yoctoproject.org/mt/90736059/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to