{"issue":{"created_at":"2011-11-21T02:05:44Z","state":"open","updated_at":"2011-11-21T06:23:12Z","user":{"gravatar_id":"78882c76ca550d4c52c8ffe48fffc0cb","id":663390,"url":"https://api.github.com/users/mlakewood","login":"mlakewood","avatar_url":"https://secure.gravatar.com/avatar/78882c76ca550d4c52c8ffe48fffc0cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"Hi,\r\n\r\nI had a little bit of spare time, so thought It might be good to add a nicer error message into the try scheduler when the file passed to it is longer than MAX_LENGTH?\r\n\r\nBasically I just check the length and emit a BadJobFile exception, but with a nicer error message. I also have a unit test to test it.\r\n\r\nLet us know what you think.\r\n\r\nCheers","assignee":null,"labels":[],"id":2300702,"pull_request":{"patch_url":"https://github.com/djmitche/buildbot/pull/10.patch","html_url":"https://github.com/djmitche/buildbot/pull/10","diff_url":"https://github.com/djmitche/buildbot/pull/10.diff"},"number":10,"title":"NetString.MAX_LENGTH","html_url":"https://github.com/djmitche/buildbot/issues/10","closed_at":null,"milestone":null,"url":"https://api.github.com/repos/djmitche/buildbot/issues/10"},"action":"created","comment":{"created_at":"2011-11-21T06:23:12Z","updated_at":"2011-11-21T06:23:12Z","user":{"gravatar_id":"96342dbb350e3be883a4cb2f7c3f2423","id":28673,"url":"https://api.github.com/users/djmitche","login":"djmitche","avatar_url":"https://secure.gravatar.com/avatar/96342dbb350e3be883a4cb2f7c3f2423?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I think it's close enough that it's OK to give a warning (in the logfile), but not raise an exception.  I don't think adding unnecessary failures is a good idea.\r\n\r\nAnd passing a StringIO isn't the problem - the problem is accessing a `len` attribute that doesn't exist on either files or StringIO objects.  You'll need to get the data from the file, and then get the length of that.","id":2811559,"url":"https://api.github.com/repos/djmitche/buildbot/issues/comments/2811559"}}