From 281f6f3c8961d2f9ca4ef63645257cdd7c447b04 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 5 Feb 2017 12:10:50 +0100 Subject: [PATCH] use jinja default() operator It's much shorter ;) Signed-off-by: Igor Gnatenko --- rust2rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust2rpm.py b/rust2rpm.py index b2c3192..e32b1e5 100644 --- a/rust2rpm.py +++ b/rust2rpm.py @@ -21,7 +21,7 @@ Version: {{ md.version }} Release: 1%{?dist} Summary: # FIXME -License: {{ md.license if md.license is not none else "# FIXME" }} +License: {{ md.license|default("# FIXME") }} URL: https://crates.io/crates/{{ md.name }} Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate