Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 216594e8aa3bc2f3ca52dab6eaa38cbb6f5d1760 Mon Sep 17 00:00:00 2001
- From: Alexey Medvedchikov <alexey.medvedchikov@gmail.com>
- Date: Fri, 28 Apr 2017 15:04:55 +0700
- Subject: [PATCH] Fix error "no matching leases"
- ---
- .../lib/fog/libvirt/requests/compute/dhcp_leases.rb | 5 +++++
- 1 file changed, 5 insertions(+)
- diff --git a/gems/2.2.5/gems/fog-libvirt-0.3.0/lib/fog/libvirt/requests/compute/dhcp_leases.rb b/gems/2.2.5/gems/fog-libvirt-0.3.0/lib/fog/libvirt/requests/compute/dhcp_leases.rb
- index 539c853..35ce1d3 100644
- --- a/gems/2.2.5/gems/fog-libvirt-0.3.0/lib/fog/libvirt/requests/compute/dhcp_leases.rb
- +++ b/gems/2.2.5/gems/fog-libvirt-0.3.0/lib/fog/libvirt/requests/compute/dhcp_leases.rb
- @@ -6,6 +6,11 @@ module Fog
- class Real
- def dhcp_leases(uuid, mac, flags = 0)
- client.lookup_network_by_uuid(uuid).dhcp_leases(mac, flags)
- + rescue => e
- + if e.message =~ /no lease with matching MAC address/
- + return []
- + end
- + raise e.class, e.message
- end
- end
- --
- 2.1.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement