summaryrefslogtreecommitdiffstats
path: root/lib/puppet/agent/locker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/agent/locker.rb')
-rw-r--r--lib/puppet/agent/locker.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/agent/locker.rb b/lib/puppet/agent/locker.rb
index eaf19177a..c49121e1b 100644
--- a/lib/puppet/agent/locker.rb
+++ b/lib/puppet/agent/locker.rb
@@ -29,9 +29,7 @@ module Puppet::Agent::Locker
end
def lockfile
- unless defined?(@lockfile)
- @lockfile = Puppet::Util::Pidlock.new(lockfile_path)
- end
+ @lockfile = Puppet::Util::Pidlock.new(lockfile_path) unless defined?(@lockfile)
@lockfile
end