# HG changeset patch # User Augie Fackler # Date 1360365252 21600 # Node ID 40f9472f5737e5157554572915431bbbd59d98a0 # Parent b280f3bfc8a0b7ab35d8c9883c65058218f2f09c byterange: remove old two-arg raise trick We don't care about the original traceback, and this was frustrating any efforts to make the code work on Python 3.3. diff -r b280f3bfc8a0 -r 40f9472f5737 mercurial/byterange.py --- a/mercurial/byterange.py Sat Feb 09 12:08:02 2013 +0100 +++ b/mercurial/byterange.py Fri Feb 08 17:14:12 2013 -0600 @@ -320,7 +320,7 @@ headers = email.message_from_string(headers) return addinfourl(fp, headers, req.get_full_url()) except ftplib.all_errors, msg: - raise IOError('ftp error', msg), sys.exc_info()[2] + raise IOError('ftp error', msg) def connect_ftp(self, user, passwd, host, port, dirs): fw = ftpwrapper(user, passwd, host, port, dirs) @@ -350,7 +350,7 @@ try: self.ftp.nlst(file) except ftplib.error_perm, reason: - raise IOError('ftp error', reason), sys.exc_info()[2] + raise IOError('ftp error', reason) # Restore the transfer mode! self.ftp.voidcmd(cmd) # Try to retrieve as a file @@ -364,7 +364,7 @@ fp = RangeableFileObject(fp, (rest,'')) return (fp, retrlen) elif not str(reason).startswith('550'): - raise IOError('ftp error', reason), sys.exc_info()[2] + raise IOError('ftp error', reason) if not conn: # Set transfer mode to ASCII! self.ftp.voidcmd('TYPE A')