byterange: remove old two-arg raise trick
authorAugie Fackler <raf@durin42.com>
Fri, 08 Feb 2013 17:14:12 -0600
changeset 18586 40f9472f5737
parent 18585 b280f3bfc8a0
child 18587 cbf5f3eb9d13
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.
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')