hgext/largefiles/remotestore.py
changeset 25079 bee00e0c2e45
parent 21084 70252bdfd39c
child 25660 328739ea70c3
--- a/hgext/largefiles/remotestore.py	Fri May 15 09:54:56 2015 -0500
+++ b/hgext/largefiles/remotestore.py	Fri May 15 09:55:15 2015 -0500
@@ -36,13 +36,12 @@
         self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash))
         fd = None
         try:
-            try:
-                fd = lfutil.httpsendfile(self.ui, filename)
-            except IOError, e:
-                raise util.Abort(
-                    _('remotestore: could not open file %s: %s')
-                    % (filename, str(e)))
+            fd = lfutil.httpsendfile(self.ui, filename)
             return self._put(hash, fd)
+        except IOError, e:
+            raise util.Abort(
+                _('remotestore: could not open file %s: %s')
+                % (filename, str(e)))
         finally:
             if fd:
                 fd.close()