]> git.decadent.org.uk Git - dak.git/commitdiff
match_architecture: Fix raising exception if an architecture is unknown
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 1 Aug 2014 17:38:28 +0000 (19:38 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 1 Aug 2014 17:38:28 +0000 (19:38 +0200)
daklib/architecture.py

index 110d522f1a63de13912e89a2b87398306f22ddb5..48e033abe4b89c9becac84fce1166bb8d71d8bc4 100644 (file)
@@ -85,9 +85,9 @@ def match_architecture(arch, wildcard):
     triplet_arch = Debian_arch_to_Debian_triplet(arch)
     triplet_wildcard = Debian_arch_to_Debian_triplet(wildcard)
 
-    if len(triplet_arch) != 3:
+    if triplet_arch is None or len(triplet_arch) != 3:
         raise InvalidArchitecture('{0} is not a valid architecture name'.format(arch))
-    if len(triplet_wildcard) != 3:
+    if triplet_wildcard is None or len(triplet_wildcard) != 3:
         raise InvalidArchitecture('{0} is not a valid architecture name or wildcard'.format(wildcard))
 
     for i in range(0,3):