From 1ce7c32d07f10128123e1f276230635bbcac6403 Mon Sep 17 00:00:00 2001 From: Headshot Date: Fri, 12 Jul 2019 00:27:53 -0430 Subject: [PATCH] just in case if anything was left out --- ini.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ini.py b/ini.py index f20d128..f4ec6a7 100644 --- a/ini.py +++ b/ini.py @@ -1,9 +1,10 @@ from ConfigParser import ConfigParser +from PyQt4.QtCore import QString def read_ini(file, section, value, default=""): - if isinstance(file, str): + if isinstance(file, str) or isinstance(file, QString): conf = ConfigParser() - conf.read(file) + conf.read(str(file)) else: conf = file @@ -16,9 +17,9 @@ def read_ini(file, section, value, default=""): return default def read_ini_bool(file, section, value, default=False): - if isinstance(file, str): + if isinstance(file, str) or isinstance(file, QString): conf = ConfigParser() - conf.read(file) + conf.read(str(file)) else: conf = file @@ -31,9 +32,9 @@ def read_ini_bool(file, section, value, default=False): return default def read_ini_int(file, section, value, default=0): - if isinstance(file, str): + if isinstance(file, str) or isinstance(file, QString): conf = ConfigParser() - conf.read(file) + conf.read(str(file)) else: conf = file