From 3dafcf37bc7d8a6d7a9a862c74c00bebf2a12ff8 Mon Sep 17 00:00:00 2001 From: manson Date: Wed, 3 Sep 2014 18:57:28 +0800 Subject: [PATCH] rescue import_controller import_status file not found --- app/controllers/admin/import_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/import_controller.rb b/app/controllers/admin/import_controller.rb index 545a3ca..f4b2de8 100644 --- a/app/controllers/admin/import_controller.rb +++ b/app/controllers/admin/import_controller.rb @@ -1218,7 +1218,11 @@ class Admin::ImportController < OrbitAdminController end def get_settings_from_import_file - YAML::load_file "#{Rails.root.to_s}/public/import_status.yml" + begin + YAML::load_file "#{Rails.root.to_s}/public/import_status.yml" + rescue Exception => e + write_to_file + end end def get_user