Permalink
Browse files

Avoid trying to update YAML::ENGINE if it's not there

  • Loading branch information...
1 parent eede1a9 commit 3bf2332b1f6f010b7a5238585579e97fbe92108b @rtyler committed Jul 21, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 bin/blimpy
View
@@ -1,10 +1,14 @@
#!/usr/bin/env ruby
-require 'rubygems'
-require 'yaml'
# Need to force the psych engine since syck doesn't seem to serialize the
# OpenStack Floating IPs
-YAML::ENGINE.yamler = 'psych'
+begin
+ require 'rubygems'
+ require 'yaml'
+ YAML::ENGINE.yamler = 'psych'
+rescue NameError
+ # I don't think we have YAML::ENGINE until Ruby 1.9
+end
begin
require 'blimpy/cli'

0 comments on commit 3bf2332

Please sign in to comment.