From 95566f366dc434e523bb811182681c4c46a28368 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20C=C3=B4t=C3=A9-Tremblay?=
 <david.cote-tremblay@savoirfairelinux.com>
Date: Tue, 25 Oct 2016 12:33:33 -0400
Subject: [PATCH] make_ring.py: fix Debian detection

Debian 8 in /etc/os-release with choose_distribution()
now returns "Debian" instead of "Debian GNU/Linux"

Change-Id: I1e23a320a71f326a961eb0fe64bc394d763fc656
Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
---
 make-ring.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/make-ring.py b/make-ring.py
index 7ce11ff9..b77c1252 100755
--- a/make-ring.py
+++ b/make-ring.py
@@ -360,7 +360,7 @@ def validate_args(parsed_args):
     supported_distros = ['Android', 'Ubuntu', 'Debian', 'OSX', 'Fedora', 'Arch Linux', 'openSUSE', 'Automatic', 'mingw32', 'mingw64']
 
     if parsed_args.distribution not in supported_distros:
-        print('Distribution not supported.\nChoose one of: %s' \
+        print('Distribution \''+parsed_args.distribution+'\' not supported.\nChoose one of: %s' \
                   % ', '.join(supported_distros),
             file=sys.stderr)
         sys.exit(1)
@@ -417,7 +417,7 @@ def choose_distribution():
             for line in f:
                 k,v = line.split("=")
                 if k.strip() == 'NAME':
-                    return v.strip().replace('"','')
+                    return v.strip().replace('"','').split(' ')[0]
     elif system == "darwin":
         return 'OSX'
 
-- 
GitLab