]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
Fix extract_component_from_section() and testcase.
[dak.git] / daklib / utils.py
index 133500c66fc90883a6be95c6b535fbb6302fee78..8bc1b2c7c2c4db01405b6d375e8e30d2fb8981ad 100755 (executable)
@@ -138,7 +138,7 @@ def our_raw_input(prompt=""):
 
 ################################################################################
 
-def extract_component_from_section(section):
+def extract_component_from_section(section, session=None):
     component = ""
 
     if section.find('/') != -1:
@@ -146,11 +146,11 @@ def extract_component_from_section(section):
 
     # Expand default component
     if component == "":
-        comp = get_component(section)
+        comp = get_component(section, session)
         if comp is None:
             component = "main"
         else:
-            component = comp.componant_name
+            component = comp.component_name
 
     return (section, component)