summaryrefslogtreecommitdiff
path: root/subsync.py
diff options
context:
space:
mode:
authorDavid Gay <eapoems@riseup.net>2024-01-29 02:18:02 -0500
committerDavid Gay <eapoems@riseup.net>2024-01-29 02:18:02 -0500
commit9243414cdb0d28332eec6afbedef76b990e35dc7 (patch)
tree1ed9e9b2ee0db0139322b519106501af90dc8f2f /subsync.py
parent50a99d5991c0f2fe0f718bf49b7418a193f892c9 (diff)
Better commentHEADmaster
Diffstat (limited to 'subsync.py')
-rw-r--r--subsync.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/subsync.py b/subsync.py
index 23343a6..df45c5f 100644
--- a/subsync.py
+++ b/subsync.py
@@ -19,8 +19,9 @@ os.chdir(os.path.dirname(os.path.realpath(__file__)))
class mopen:
def __init__(self, filename, mode='r'):
- # TODO: Attempt checking encoding, and only fall back to utf-8 if it fails.
- # self.real_encoding = chardet.detect(open(filename, 'rb').read())['encoding'].lower()
+ # TODO: Next time I run this script, add a try/except that falls back to utf-8 if the detection fails.
+ # file_detect = chardet.detect(open(filename, 'rb').read())
+ # self.real_encoding = file_detect['encoding'].lower()
self.file_o = open(filename, mode, encoding="utf-8")
def __getattr__(self, name):