Пример #1
0
 def _read(self, fp, fpname):
     SafeConfigParser._read(self, fp, fpname)
     new_sections = self._dict()
     for a_section in self._sections:
         tmp = self._sections[a_section]
         new_sections[a_section.lower()] = tmp
     self._sections = new_sections
Пример #2
0
 def _read(self, fp, fpname):
     SafeConfigParser._read(self, fp, fpname)
     new_sections = self._dict()
     for a_section in self._sections:
         tmp = self._sections[a_section]
         new_sections[a_section.lower()] = tmp
     self._sections = new_sections
Пример #3
0
    def _read(self, fptr, fname):
        """Parse a sectioned setup file.

        Override the same method of parent class.

        Customization: save filename and file contents
        """

        # save the original filepath and contents
        self._fpname = fname
        self._flines = fptr.readlines()
        fptr.seek(0)

        return SafeConfigParser._read(self, fptr, fname)
Пример #4
0
    def _read(self, fptr, fname):
        """Parse a sectioned setup file.

        Override the same method of parent class.

        Customization: save filename and file contents
        """

        # save the original filepath and contents
        self._fpname = fname
        self._flines = fptr.readlines()
        fptr.seek(0)

        return SafeConfigParser._read(self, fptr, fname)
Пример #5
0
 def _read(self, fp, fpname):
     SafeConfigParser._read(self, FakeSection(fp), fpname)
 def _read(self, fp, fpname):
     SafeConfigParser._read(self, FakeSection(fp), fpname)
Пример #7
0
 def _read(self, fp, fpname):
     self._sections.fp.fp = fp
     self._sections.fp.name = fpname
     self._sections.fp.lineno = 0
     SafeConfigParser._read(self, self._sections.fp, fpname)
     self._sections.fp.__init__()