palo_alto 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PaloAlto
4
- VERSION = '0.2.9'
4
+ VERSION = '0.3.0'
5
5
  end
data/lib/palo_alto.rb CHANGED
@@ -297,7 +297,9 @@ module PaloAlto
297
297
  cmd = { request: { "#{area}-lock": { add: { comment: comment || '(null)' } } } }
298
298
  op.execute(cmd, type: type, location: location)
299
299
  true
300
- rescue PaloAlto::InternalErrorException
300
+ rescue PaloAlto::InternalErrorException => e
301
+ return true if e.message.start_with?('You already own a config lock for scope ')
302
+
301
303
  false
302
304
  end
303
305
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: palo_alto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Roesner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-16 00:00:00.000000000 Z
11
+ date: 2022-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri