From 3da68967f977de56317a42cb06860180364ec5ea Mon Sep 17 00:00:00 2001 From: nishiki Date: Mon, 11 May 2015 19:30:17 +0200 Subject: [PATCH] fix import default yaml --- lib/UI/Cli.rb | 4 +--- mpw | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/UI/Cli.rb b/lib/UI/Cli.rb index 35f3399..7c5fc74 100644 --- a/lib/UI/Cli.rb +++ b/lib/UI/Cli.rb @@ -32,7 +32,7 @@ class Cli raise(@sync.error_msg) if not @sync.sync return true - rescue Exception => e +# rescue Exception => e puts "#{I18n.t('display.error')} #7: #{e}".red return false end @@ -298,10 +298,8 @@ class Cli if not force result = @mpw.import_preview(file, type) - puts result if result.is_a?(Array) and not result.empty? result.each do |r| - puts r.class display_item(r) end diff --git a/mpw b/mpw index ad632b1..bda314c 100755 --- a/mpw +++ b/mpw @@ -92,6 +92,7 @@ OptionParser.new do |opts| opts.on('-i', '--import FILE', I18n.t('option.import')) do |file| options[:import] = file + options[:type] = :yaml end opts.on('-f', '--force', I18n.t('option.force')) do