VirtualBox

Changeset 98950 in vbox


Ignore:
Timestamp:
Mar 14, 2023 9:00:33 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156299
Message:

Docs: bugref:10302. Do not use obsolete codecs module for file open. Now that open() can take encoding parameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/htmlhelp-qthelp.py

    r98865 r98950  
    1010import os.path
    1111import re
    12 import codecs
    1312import logging
    1413
     
    5352    for html_file_name in html_files:
    5453        full_html_path = os.path.join(folder, html_file_name)
    55         file_content = codecs.open(full_html_path, encoding='utf-8').read()
     54        file_content = open(full_html_path, encoding='utf-8').read()
    5655
    5756        class html_parser(HTMLParser):
     
    10099        return html_file_lines
    101100    full_path = os.path.join(folder, list_file)
    102     file = codecs.open(full_path, encoding='utf-8')
     101    file = open(full_path, encoding='utf-8')
    103102
    104103    lines = file.readlines()
     
    199198        return toc_string_list
    200199    full_path = os.path.join(folder, toc_file)
    201     file = codecs.open(full_path, encoding='utf-8')
     200    file = open(full_path, encoding='utf-8')
    202201    content = file.read()
    203202    file.close()
     
    258257        elif opt in ("-o"):
    259258             output_filename = arg
    260 
    261259    # check supplied helphtml folder argument
    262260    if not helphtmlfolder:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette