[pve-devel] [PATCH] fix "Use of uninitialized value $target"

Alexandre Derumier aderumier at odiso.com
Thu May 2 06:33:45 CEST 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 9baa16e..dedb9ad 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1886,7 +1886,7 @@ __PACKAGE__->register_method({
 
         my $localnode = PVE::INotify::nodename();
 
-        undef $target if $target eq $localnode || $target eq 'localhost';
+        undef $target if $target && ($target eq $localnode || $target eq 'localhost');
 
 	PVE::Cluster::check_node_exists($target) if $target;
 
-- 
1.7.10.4




More information about the pve-devel mailing list