##// END OF EJS Templates
pull/unbundle: raise an exception on premature EOF
mpm@selenic.com -
r1280:50553b99 default
parent child Browse files
Show More
@@ -956,7 +956,12 b' class localrepository:'
956 if not d: return ""
956 if not d: return ""
957 l = struct.unpack(">l", d)[0]
957 l = struct.unpack(">l", d)[0]
958 if l <= 4: return ""
958 if l <= 4: return ""
959 return source.read(l - 4)
959 d = source.read(l - 4)
960 if len(d) < l - 4:
961 raise repo.RepoError("premature EOF reading chunk" +
962 " (got %d bytes, expected %d)"
963 % (len(d), l - 4))
964 return d
960
965
961 def getgroup():
966 def getgroup():
962 while 1:
967 while 1:
General Comments 0
You need to be logged in to leave comments. Login now