lib/tw/client/auth.rb in tw-1.0.5 vs lib/tw/client/auth.rb in tw-1.0.6

- old
+ new

@@ -40,10 +40,14 @@ def self.regist_user consumer = OAuth::Consumer.new(Conf['consumer_key'], Conf['consumer_secret'], :site => 'https://api.twitter.com') request_token = consumer.get_request_token puts "open #{request_token.authorize_url}" - Launchy.open request_token.authorize_url + begin + Launchy.open request_token.authorize_url + rescue + STDERR.puts "couldn't open web-browser" + end print 'input PIN Number: ' verifier = STDIN.gets.strip access_token = request_token.get_access_token(:oauth_verifier => verifier) client = Tw::Client.new.auth('access_token' => access_token.token, 'access_secret' => access_token.secret)