From 26d59b09b0aeb73451333b60fe0fe64d4a4777ef Mon Sep 17 00:00:00 2001 From: lyon Date: Mon, 4 Jul 2022 17:46:46 +0800 Subject: [PATCH] format configparser.py --- port/linux/package/pikascript/configparser.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/port/linux/package/pikascript/configparser.py b/port/linux/package/pikascript/configparser.py index 302d0bb07..56c8c48f0 100644 --- a/port/linux/package/pikascript/configparser.py +++ b/port/linux/package/pikascript/configparser.py @@ -5,10 +5,6 @@ class ConfigParser(): content = '' config_dict = {} - def read_string(self, content): - self.content = content - self._parse() - def _parse(self): content = String(self.content) lines = content.split('\n') @@ -87,12 +83,18 @@ class ConfigParser(): return content def write(self, file_name): - self.content = self.__str__(self) print('Error: write() method not implemented') - print(self.content) raise + self.content = self.__str__(self) + print(self.content) + + def read_string(self, content): + self.content = content + self._parse() def read(self, file_name): print('Error: read() method not implemented') raise + content = '' + self.content = content self._parse()