[PATCH] Bug 73948 test suite related fix

John A Meinel john at arbash-meinel.com
Thu Dec 7 00:54:00 GMT 2006


John Arbash Meinel has voted +1 (conditional).
Status is now: Semi-approved
Comment:
I thought some of this has already been merged. Do you know how much?


+ # RFC2616 14-16 says that invalid Range headers could 
+ # be ignored and in that case, the whole file should 
+ # be returned as if no Range header was present. Or 
+ # that the server should returns a 416 error.

should be:

+ # RFC2616 14-16 says that invalid Range headers can
+ # be ignored. If they are the whole file should 
+ # be returned as though no Range header was present. Or 
+ # the server should return a 416 error.

Here:
+ except (errors.InvalidRange, errors.ShortReadvError), exception: 
+ # Note that we replace 'f' here and that it

Calling the variable 'exception' probably isn't the best. I typically use 'e'. Though I know we also avoid using single letter names.
To me, 'exception' just begs to collide with a built-in name. (Certainly the class Exception is very similar)

Also, if you are catching it because you want to re-raise it. You probably want to do:

  info = sys.exc_info()

and then later:
  raise info[0], info[1], info[2]

That will actually provide the original traceback in the raise.

For details, see: http://bundlebuggy.aaronbentley.com/request/%3C87psb34pae.fsf%40alplog.fr%3E




More information about the bazaar mailing list