2to3 everything

This commit is contained in:
flan
2017-11-04 02:06:42 +01:00
parent c08fb74d91
commit 0cc21101d7
10 changed files with 61 additions and 60 deletions

View File

@@ -1 +1 @@
import db_utils
from . import db_utils

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from cStringIO import StringIO
from io import StringIO
import json
import logging
import logging.config

View File

@@ -70,7 +70,7 @@ def monkeypatch_db():
def patched___init__(self, path, text=None, timeout=0):
# Code taken from Anki's DB.__init__()
encpath = path
if isinstance(encpath, unicode):
if isinstance(encpath, str):
encpath = path.encode("utf-8")
# Allow more than one thread to use this connection.
self._db = sqlite.connect(encpath,

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import ConfigParser
import configparser
import logging
import os
import shutil
@@ -22,7 +22,7 @@ def create_server_paths():
}
def create_sync_app(server_paths, config_path):
config = ConfigParser.SafeConfigParser()
config = configparser.SafeConfigParser()
config.read(config_path)
# Use custom files and dirs in settings.