summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/indirection.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index a9fff75b8..e6068a6aa 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -262,7 +262,11 @@ class Puppet::Indirector::Indirection
return unless terminus.respond_to?(:authorized?)
unless terminus.authorized?(request)
- raise ArgumentError, "Not authorized to call %s on %s with %s" % [request.method, request.key, request.options.inspect]
+ msg = "Not authorized to call %s on %s" % [request.method, request.key]
+ unless request.options.empty?
+ msg += " with %s" % request.options.inspect
+ end
+ raise ArgumentError, msg
end
end