summaryrefslogtreecommitdiff
path: root/bin/custodian-enqueue
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
commitbfa2a562f0f12fbf2560966dbaea4d544b188004 (patch)
treeb032806c530191ec72b176120689abdb92ec53a6 /bin/custodian-enqueue
parent094eb9de7b10511829aaee616df1b2e8f5e5b6af (diff)
Updated comments. Simplified argument testing in the constructor
Diffstat (limited to 'bin/custodian-enqueue')
-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