]> git.decadent.org.uk Git - dak.git/commitdiff
extract_component_from_section: avoid unneeded database lookup
authorAnsgar Burchardt <ansgar@debian.org>
Thu, 31 Jul 2014 19:21:23 +0000 (21:21 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Thu, 31 Jul 2014 19:21:23 +0000 (21:21 +0200)
daklib/utils.py

index 3ae8d289cd14c84d3abee8b355849fb01d4fa64e..90c87bf4435fa6e0a625dfbb1ef76c017fcc87fe 100644 (file)
@@ -155,11 +155,7 @@ def extract_component_from_section(section, session=None):
 
     # Expand default component
     if component == "":
-        comp = get_component(section, session)
-        if comp is None:
-            component = "main"
-        else:
-            component = comp.component_name
+        component = "main"
 
     return (section, component)