diff mbox series

[kteam-tools] maint-startnewrelease: stop if DEBEMAIL is unset

Message ID 1517512809-8068-1-git-send-email-kamal@canonical.com
State New
Headers show
Series [kteam-tools] maint-startnewrelease: stop if DEBEMAIL is unset | expand

Commit Message

Kamal Mostafa Feb. 1, 2018, 7:20 p.m. UTC
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 maintscripts/maint-startnewrelease | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Kleber Sacilotto de Souza Feb. 6, 2018, 4:39 p.m. UTC | #1
On 02/01/18 20:20, Kamal Mostafa wrote:
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  maintscripts/maint-startnewrelease | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/maintscripts/maint-startnewrelease b/maintscripts/maint-startnewrelease
> index 3d3f9b1..50ccdd8 100755
> --- a/maintscripts/maint-startnewrelease
> +++ b/maintscripts/maint-startnewrelease
> @@ -57,10 +57,9 @@ if not mailenforce:
>  	mailenforce = "@canonical.com"
>  
>  debem = os.getenv("DEBEMAIL")
> -if debem is not None:
> -	if mailenforce not in debem:
> -		print 'DEBEMAIL does not contain', mailenforce
> -		sys.exit(1)
> +if (debem is None) or (debem is not None and mailenforce not in debem):
> +            print 'DEBEMAIL is unset, or does not contain', mailenforce
> +            sys.exit(1)

Good catch.

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

>  
>  #------------------------------------------------------------------------------
>  # Find the abstracted debian directory and make sure it is there (IOW we are
>
Khalid Elmously Feb. 9, 2018, 3:35 p.m. UTC | #2
On 2018-02-01 11:20:09 , Kamal Mostafa wrote:
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  maintscripts/maint-startnewrelease | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/maintscripts/maint-startnewrelease b/maintscripts/maint-startnewrelease
> index 3d3f9b1..50ccdd8 100755
> --- a/maintscripts/maint-startnewrelease
> +++ b/maintscripts/maint-startnewrelease
> @@ -57,10 +57,9 @@ if not mailenforce:
>  	mailenforce = "@canonical.com"
>  
>  debem = os.getenv("DEBEMAIL")
> -if debem is not None:
> -	if mailenforce not in debem:
> -		print 'DEBEMAIL does not contain', mailenforce
> -		sys.exit(1)
> +if (debem is None) or (debem is not None and mailenforce not in debem):
> +            print 'DEBEMAIL is unset, or does not contain', mailenforce
> +            sys.exit(1)
>  
>  #------------------------------------------------------------------------------
>  # Find the abstracted debian directory and make sure it is there (IOW we are

Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Kleber Sacilotto de Souza March 1, 2018, 5:30 p.m. UTC | #3
On 02/01/18 20:20, Kamal Mostafa wrote:
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  maintscripts/maint-startnewrelease | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/maintscripts/maint-startnewrelease b/maintscripts/maint-startnewrelease
> index 3d3f9b1..50ccdd8 100755
> --- a/maintscripts/maint-startnewrelease
> +++ b/maintscripts/maint-startnewrelease
> @@ -57,10 +57,9 @@ if not mailenforce:
>  	mailenforce = "@canonical.com"
>  
>  debem = os.getenv("DEBEMAIL")
> -if debem is not None:
> -	if mailenforce not in debem:
> -		print 'DEBEMAIL does not contain', mailenforce
> -		sys.exit(1)
> +if (debem is None) or (debem is not None and mailenforce not in debem):
> +            print 'DEBEMAIL is unset, or does not contain', mailenforce
> +            sys.exit(1)
>  
>  #------------------------------------------------------------------------------
>  # Find the abstracted debian directory and make sure it is there (IOW we are
> 

Applied to kteam-tools/master branch.

Thanks!
Kleber
diff mbox series

Patch

diff --git a/maintscripts/maint-startnewrelease b/maintscripts/maint-startnewrelease
index 3d3f9b1..50ccdd8 100755
--- a/maintscripts/maint-startnewrelease
+++ b/maintscripts/maint-startnewrelease
@@ -57,10 +57,9 @@  if not mailenforce:
 	mailenforce = "@canonical.com"
 
 debem = os.getenv("DEBEMAIL")
-if debem is not None:
-	if mailenforce not in debem:
-		print 'DEBEMAIL does not contain', mailenforce
-		sys.exit(1)
+if (debem is None) or (debem is not None and mailenforce not in debem):
+            print 'DEBEMAIL is unset, or does not contain', mailenforce
+            sys.exit(1)
 
 #------------------------------------------------------------------------------
 # Find the abstracted debian directory and make sure it is there (IOW we are