Show More
@@ -159,7 +159,7 b' def _buildpackmeta(metadict):' | |||||
159 | length limit is exceeded |
|
159 | length limit is exceeded | |
160 | """ |
|
160 | """ | |
161 | metabuf = b'' |
|
161 | metabuf = b'' | |
162 |
for k, v in sorted( |
|
162 | for k, v in sorted((metadict or {}).items()): | |
163 | if len(k) != 1: |
|
163 | if len(k) != 1: | |
164 | raise error.ProgrammingError(b'packmeta: illegal key: %s' % k) |
|
164 | raise error.ProgrammingError(b'packmeta: illegal key: %s' % k) | |
165 | if len(v) > 0xFFFE: |
|
165 | if len(v) > 0xFFFE: | |
@@ -187,7 +187,7 b' def buildpackmeta(metadict):' | |||||
187 | and METAKEYFLAG will be dropped if its value is 0. |
|
187 | and METAKEYFLAG will be dropped if its value is 0. | |
188 | """ |
|
188 | """ | |
189 | newmeta = {} |
|
189 | newmeta = {} | |
190 |
for k, v in |
|
190 | for k, v in (metadict or {}).items(): | |
191 | expectedtype = _metaitemtypes.get(k, (bytes,)) |
|
191 | expectedtype = _metaitemtypes.get(k, (bytes,)) | |
192 | if not isinstance(v, expectedtype): |
|
192 | if not isinstance(v, expectedtype): | |
193 | raise error.ProgrammingError(b'packmeta: wrong type of key %s' % k) |
|
193 | raise error.ProgrammingError(b'packmeta: wrong type of key %s' % k) |
General Comments 0
You need to be logged in to leave comments.
Login now