Vinzenz Feenstra has posted comments on this change. Change subject: virt: Optimize guest agent string filtering ......................................................................
Patch Set 7: (2 comments) http://gerrit.ovirt.org/#/c/36630/7/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 43: union(set(range(0xE, 0x1F + 1))). \ Line 44: union(set(range(0x7F, 0x84 + 1))). \ Line 45: union(set(range(0x86, 0x9F + 1))). \ Line 46: union(set((0xFFFE, 0xFFFF))) Line 47: __RESTRICTED_CHARS = frozenset(map(unichr, __RESTRICTED_CHARS)) > This creates a lot of lists and sets, then create a frozenset and drop all Done Line 48: Line 49: Line 50: def _filterXmlChars(u): Line 51: """ Line 69: raise TypeError Line 70: Line 71: chars = array.array('u', u) Line 72: for i, c in enumerate(chars): Line 73: # v = ord(c) > Can be remove now Done Line 74: if (c > u'\U00010fff' or unicodedata.category(c) == 'Cs' Line 75: or c in __RESTRICTED_CHARS): Line 76: chars[i] = __REPLACEMENT_CHAR Line 77: return chars.tounicode() -- To view, visit http://gerrit.ovirt.org/36630 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief8da73dc180212b594937e658ae8f5f57c63bac Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <mskri...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches