gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht
git-svn-id: https://svn.neo-layout.org@2275 b9310e46-f624-0410-8ea1-cfbb3a30dc96
This commit is contained in:
parent
99b07611b8
commit
782d640d08
1 changed files with 10 additions and 1 deletions
|
@ -9,11 +9,19 @@ rescue LoadError
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'gconf2'
|
||||||
|
rescue LoadError
|
||||||
|
$stderr << "########################################################\n"
|
||||||
|
$stderr << "# In order to run this programm you need ruby-gconf2! #\n"
|
||||||
|
$stderr << "########################################################\n"
|
||||||
|
raise
|
||||||
|
end
|
||||||
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'pp'
|
require 'pp'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
require 'gconf2'
|
|
||||||
|
|
||||||
TRAYCOMMANDVERSION = [0,1]
|
TRAYCOMMANDVERSION = [0,1]
|
||||||
|
|
||||||
|
@ -39,6 +47,7 @@ optpars = OptionParser.new { |opts|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
optpars.parse!
|
optpars.parse!
|
||||||
|
$options.configfile ||= "layoutswitch.yaml"
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e
|
puts e
|
||||||
puts optpars
|
puts optpars
|
||||||
|
|
Loading…
Add table
Reference in a new issue