[pve-devel] applied: [PATCH common] print defaulttxt as sprintf parameter

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jun 6 11:29:55 CEST 2019


On 6/6/19 11:03 AM, Dominik Csapak wrote:
> instead of having it verbatim in the format string.
> This enables us to have '%' in the defaulttext without getting errors
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/RESTHandler.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
> index 49d43b9..75d5d2e 100644
> --- a/src/PVE/RESTHandler.pm
> +++ b/src/PVE/RESTHandler.pm
> @@ -538,7 +538,7 @@ my $get_property_description = sub {
>  	    die "unknown style '$style'";
>  	}
>  
> -	my $tmp = sprintf "  %-10s %s$defaulttxt\n", $display_name, "$type_text";
> +	my $tmp = sprintf "  %-10s %s%s\n", $display_name, "$type_text", "$defaulttxt";
>  	my $indend = "             ";
>  
>  	$res .= Text::Wrap::wrap('', $indend, ($tmp));
> 

applied, thanks!




More information about the pve-devel mailing list