equal
deleted
inserted
replaced
80 |
80 |
81 cdata = config.config() |
81 cdata = config.config() |
82 trusted = sections or assumetrusted or self._is_trusted(fp, filename) |
82 trusted = sections or assumetrusted or self._is_trusted(fp, filename) |
83 |
83 |
84 try: |
84 try: |
85 cdata.read(filename, fp) |
85 cdata.read(filename, fp, sections=sections) |
86 except error.ConfigError, inst: |
86 except error.ConfigError, inst: |
87 if trusted: |
87 if trusted: |
88 raise |
88 raise |
89 self.warn(_("Ignored: %s\n") % str(inst)) |
89 self.warn(_("Ignored: %s\n") % str(inst)) |
90 |
90 |
91 if trusted: |
91 if trusted: |
92 self.cdata.update(cdata, sections) |
92 self.cdata.update(cdata) |
93 self.cdata.update(self.overlay, sections) |
93 self.cdata.update(self.overlay) |
94 self.ucdata.update(cdata, sections) |
94 self.ucdata.update(cdata) |
95 self.ucdata.update(self.overlay, sections) |
95 self.ucdata.update(self.overlay) |
96 |
96 |
97 if root is None: |
97 if root is None: |
98 root = os.path.expanduser('~') |
98 root = os.path.expanduser('~') |
99 self.fixconfig(root=root) |
99 self.fixconfig(root=root) |
100 |
100 |