From 8ec4fc755cf2ef50598a5b275b2d801b318a788d Mon Sep 17 00:00:00 2001 From: Seblu Date: Thu, 6 Jan 2011 13:05:28 +0100 Subject: [PATCH] use a raw config parser --- bin/cc-cli | 2 +- cccli/command.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cc-cli b/bin/cc-cli index 3983de0..199ce32 100755 --- a/bin/cc-cli +++ b/bin/cc-cli @@ -31,7 +31,7 @@ settings = { def load_config_file(config, filename, section): '''Update a dict with param from an ini file ''' if os.access(filename, os.R_OK): - fparser = ConfigParser.SafeConfigParser() + fparser = ConfigParser.RawConfigParser() fparser.read(filename) if fparser.has_section(section): config.update(fparser.items(section)) diff --git a/cccli/command.py b/cccli/command.py index b332e76..b29b939 100644 --- a/cccli/command.py +++ b/cccli/command.py @@ -476,7 +476,7 @@ class Alias(dict): def load(self, filename): '''load alias from file''' if os.access(filename, os.R_OK): - fparser = ConfigParser.SafeConfigParser() + fparser = ConfigParser.RawConfigParser() fparser.read(filename) if fparser.has_section("alias"): self.clear() @@ -485,7 +485,7 @@ class Alias(dict): def save(self, filename): '''save alias on file''' if os.access(filename, os.R_OK or os.W_OK): - fparser = ConfigParser.SafeConfigParser() + fparser = ConfigParser.RawConfigParser() fparser.read(filename) fparser.remove_section("alias") fparser.add_section("alias") -- GitLab