Nir Soffer has posted comments on this change.

Change subject: Fix configfile to use unicode which allows to add toolTests to 
python3 check
......................................................................


Patch Set 14:

(1 comment)

https://gerrit.ovirt.org/#/c/48052/14/lib/vdsm/tool/configfile.py
File lib/vdsm/tool/configfile.py:

Line 114:     def _getOldContent(self):
Line 115:         confpat = re.compile(r'^\s*(?P<key>[^=\s#]*)\s*=')
Line 116:         oldlines = []
Line 117:         oldentries = set()
Line 118:         with io.open(self._filename, 'r', encoding='utf8') as f:
> we might have unicode values... i don't know. why to limit?
Reading and writing files using text mode (unicode) is much slower. When we 
don't need to support unicode, we should not.

Unfortunately, configparser in python 3 cannot read binary files, so we have no 
choice.
Line 119:             for line in f:
Line 120:                 if self._remove:
Line 121:                     if (self._rmstate == BEFORE and
Line 122:                             line.startswith(self._sectionStart)):


-- 
To view, visit https://gerrit.ovirt.org/48052
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I52f11a1a10cae46773d05d0c09da80ad8eb3b772
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-Reviewer: mooli tayer <mta...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to