about summary refs log tree commit homepage
path: root/lib/mogilefs/http_file.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-06-19 03:57:15 +0000
committerEric Wong <e@80x24.org>2018-06-19 23:59:55 +0000
commit4e0f8155a62711ae6762714db77904ca422b7159 (patch)
tree8cfadca05a865d6142c5115cae49348715922c1c /lib/mogilefs/http_file.rb
parentc9077a28044b32799dfd512620d25cb3cba0c6c4 (diff)
downloadmogilefs-client-4e0f8155a62711ae6762714db77904ca422b7159.tar.gz
Ruby trunk started warning about more mismatched indentations
starting around r62836.
Diffstat (limited to 'lib/mogilefs/http_file.rb')
-rw-r--r--lib/mogilefs/http_file.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/mogilefs/http_file.rb b/lib/mogilefs/http_file.rb
index a58801a..aa0bcf2 100644
--- a/lib/mogilefs/http_file.rb
+++ b/lib/mogilefs/http_file.rb
@@ -83,11 +83,11 @@ class MogileFS::HTTPFile < StringIO
 
   def rewind_or_raise!(uri, err)
     @active.rewind if @active
-    rescue => e
-      msg = "#{uri} failed with #{err.message} (#{err.class}) and " \
-            "retrying is impossible as rewind on " \
-            "#{@active.inspect} failed with: #{e.message} (#{e.class})"
-      raise NonRetryableError, msg, e.backtrace
+  rescue => e
+    msg = "#{uri} failed with #{err.message} (#{err.class}) and " \
+          "retrying is impossible as rewind on " \
+          "#{@active.inspect} failed with: #{e.message} (#{e.class})"
+    raise NonRetryableError, msg, e.backtrace
   end
 
   ##
@@ -127,12 +127,12 @@ class MogileFS::HTTPFile < StringIO
 
     read_response(sock) # raises on errors
     file_size
-    rescue SystemCallError, RetryableError => err
-      rewind_or_raise!(uri, err)
-      raise
-    ensure
-      file.close if file && @big_io != file
-      sock.close if sock
+  rescue SystemCallError, RetryableError => err
+    rewind_or_raise!(uri, err)
+    raise
+  ensure
+    file.close if file && @big_io != file
+    sock.close if sock
   end
 
   def nhp_put(devid, uri)