FIX: gz_file might be nil here

FIX: gz_file might be nil here

diff --git a/lib/discourse_ip_info.rb b/lib/discourse_ip_info.rb
index 3fb1d63..df4f6dd 100644
--- a/lib/discourse_ip_info.rb
+++ b/lib/discourse_ip_info.rb
@@ -38,7 +38,7 @@ class DiscourseIpInfo
 
     FileUtils.mv(path, mmdb_path(name))
   ensure
-    gz_file.close!
+    gz_file&.close!
   end
 
   def mmdb_load(filepath)

GitHub sha: 14c7aa88

From build:

rake aborted!
NoMethodError: undefined method `close!' for nil:NilClass
/var/www/discourse/lib/discourse_ip_info.rb:41:in `ensure in mmdb_download'
/var/www/discourse/lib/discourse_ip_info.rb:41:in `mmdb_download'
/var/www/discourse/lib/tasks/assets.rake:168:in `block (2 levels) in <top (required)>'

Caused by:
OpenURI::HTTPError: 503 Error: <!DOCTYPE HTML>

Fixed in FIX: catch proper exception · discourse/discourse@4e5305c · GitHub