75 patchPositionFound = False |
75 patchPositionFound = False |
76 |
76 |
77 for line in lines: |
77 for line in lines: |
78 if patchPositionFound and \ |
78 if patchPositionFound and \ |
79 (line.startswith(\ |
79 (line.startswith(\ |
80 " # patched by eric4 install script.") or \ |
80 " # patched by eric5 install script.") or \ |
81 line.startswith(\ |
81 line.startswith(\ |
82 " self.datasize = len(self.data)")): |
82 " self.datasize = len(self.data)")): |
83 return True |
83 return True |
84 if line.startswith(\ |
84 if line.startswith(\ |
85 " self.data = self.charset_converter(self.data)"): |
85 " self.data = self.charset_converter(self.data)"): |
113 sn = "xmlutils.py" |
113 sn = "xmlutils.py" |
114 s = open(sn, "w") |
114 s = open(sn, "w") |
115 for line in lines: |
115 for line in lines: |
116 if patchPositionFound: |
116 if patchPositionFound: |
117 if not line.startswith(\ |
117 if not line.startswith(\ |
118 " # patched by eric4 install script.") and \ |
118 " # patched by eric5 install script.") and \ |
119 not line.startswith(\ |
119 not line.startswith(\ |
120 " self.datasize = len(self.data)"): |
120 " self.datasize = len(self.data)"): |
121 s.write(" # patched by eric4 install script.\n") |
121 s.write(" # patched by eric5 install script.\n") |
122 s.write(" self.datasize = len(self.data)\n") |
122 s.write(" self.datasize = len(self.data)\n") |
123 patched = True |
123 patched = True |
124 patchPositionFound = False |
124 patchPositionFound = False |
125 s.write(line) |
125 s.write(line) |
126 if line.startswith(\ |
126 if line.startswith(\ |