Browse Source

Updated config handling to work with utf-8

bot_curator
KemoNine 4 years ago
parent
commit
3f13a0492c
  1. 4
      toot_bot.py

4
toot_bot.py

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse, sys, os, configparser, getpass, sqlite3
import argparse, sys, os, configparser, getpass, sqlite3, codecs
from mastodon import Mastodon
import feedparser
@ -115,7 +115,7 @@ if __name__ == '__main__':
# Read/parse config file
config = configparser.ConfigParser(allow_no_value=False)
config.read(config_path)
config.read_file(codecs.open(config_path, "r", "utf8"))
# Setup local variables
config_app_name = config['config']['app_name']

Loading…
Cancel
Save