diff mbox

[1/3] DhcpWatch: Print what is wrong with the line.

Message ID 22544.51039.224555.50233@mariner.uk.xensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson Oct. 26, 2016, 3:10 p.m. UTC
Konrad Rzeszutek Wilk writes ("[PATCH 1/3] DhcpWatch: Print what is wrong with the line."):
> If the user forgot to include 'dhcp3' on the parameter
> line point out the error to the user.

How about this ?

From 693471df9e9a2a491a576ae644d02751906a63cf Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Wed, 26 Oct 2016 14:14:07 -0400
Subject: [OSSTEST PATCH] DhcpWatch: Print what is wrong with the line.

If the user forgot to include 'dhcp3' on the parameter
line point out the error to the user.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: Still print out the arguments to the constructor, hopefully
    non-confusingly.
---
 Osstest/DhcpWatch/leases.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Konrad Rzeszutek Wilk Oct. 26, 2016, 3:15 p.m. UTC | #1
On Wed, Oct 26, 2016 at 04:10:23PM +0100, Ian Jackson wrote:
> Konrad Rzeszutek Wilk writes ("[PATCH 1/3] DhcpWatch: Print what is wrong with the line."):
> > If the user forgot to include 'dhcp3' on the parameter
> > line point out the error to the user.
> 
> How about this ?

+1
> 
> >From 693471df9e9a2a491a576ae644d02751906a63cf Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Date: Wed, 26 Oct 2016 14:14:07 -0400
> Subject: [OSSTEST PATCH] DhcpWatch: Print what is wrong with the line.
> 
> If the user forgot to include 'dhcp3' on the parameter
> line point out the error to the user.
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
> v2: Still print out the arguments to the constructor, hopefully
>     non-confusingly.
> ---
>  Osstest/DhcpWatch/leases.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Osstest/DhcpWatch/leases.pm b/Osstest/DhcpWatch/leases.pm
> index b74ebf0..98c22b9 100644
> --- a/Osstest/DhcpWatch/leases.pm
> +++ b/Osstest/DhcpWatch/leases.pm
> @@ -40,7 +40,8 @@ BEGIN {
>  
>  sub new {
>      my ($class, $ho, $meth, $format, $source) = @_;
> -    die "$format (@_) ?" unless $format eq 'dhcp3';
> +    die "'$format' is missing dhcp3 in it! (args: @_) ?"
> +	unless $format eq 'dhcp3';
>      return bless {
>  	Format => $format,
>  	Source => $source,
> -- 
> 2.1.4
>
diff mbox

Patch

diff --git a/Osstest/DhcpWatch/leases.pm b/Osstest/DhcpWatch/leases.pm
index b74ebf0..98c22b9 100644
--- a/Osstest/DhcpWatch/leases.pm
+++ b/Osstest/DhcpWatch/leases.pm
@@ -40,7 +40,8 @@  BEGIN {
 
 sub new {
     my ($class, $ho, $meth, $format, $source) = @_;
-    die "$format (@_) ?" unless $format eq 'dhcp3';
+    die "'$format' is missing dhcp3 in it! (args: @_) ?"
+	unless $format eq 'dhcp3';
     return bless {
 	Format => $format,
 	Source => $source,