summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-13 22:08:31 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-13 22:08:31 +0000
commitfec61848ae594fca52311274b9b5669fac402745 (patch)
treeb032806c530191ec72b176120689abdb92ec53a6
parentc50322f36aacb0c4e486f915bdd3ac7de74d75e3 (diff)
Updated comments. Simplified argument testing in the constructor
-rwxr-xr-xbin/custodian-enqueue9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue
index 6e5627a..72ff5d3 100755
--- a/bin/custodian-enqueue
+++ b/bin/custodian-enqueue
@@ -32,9 +32,7 @@ require 'uri'
#
# TODO:
#
-# 1. Explicitly abort and panic on malformed lines.
-#
-# 2. Implement HTTP-fetching for macro-bodies.
+# 1. Explicitly abort and panic on malformed lines.
#
#
# Steve
@@ -68,9 +66,8 @@ class MonitorConfig
@queue = Beanstalk::Pool.new(['127.0.0.1:11300'])
@file = filename
- if ( @file.nil? || ( ! File.exists?( @file) ) )
- raise ArgumentError, "Missing configuration file!"
- end
+ raise ArgumentError, "Missing configuration file!" if ( @file.nil? )
+ raise ArgumentError, "File not found: #{@file}" unless ( File.exists?( @file) )
end