huge cleanup for removing mutables used as default
[sfa.git] / sfa / rspecs / elements / versions / nitosv1Channel.py
index 1ebf7ab..cf4a5f6 100644 (file)
@@ -48,13 +48,14 @@ class NITOSv1Channel:
           
         channel_elems = []       
         for channel in channels:
-            channel_fields = ['channel_num', 'frequency', 'standard']
+            channel_fields = ['channel_num', 'frequency', 'standard', 'component_id']
             channel_elem = spectrum_elem.add_instance('channel', channel, channel_fields)
             channel_elems.append(channel_elem)
 
 
     @staticmethod
-    def get_channels(xml, filter={}):
+    def get_channels(xml, filter=None):
+        if filter is None: filter={}
         xpath = '//channel%s | //default:channel%s' % (XpathFilter.xpath(filter), XpathFilter.xpath(filter))
         channel_elems = xml.xpath(xpath)
         return NITOSv1Channel.get_channel_objs(channel_elems)
@@ -67,6 +68,7 @@ class NITOSv1Channel:
             channel['channel_num'] = channel_elem.attrib['channel_num']
             channel['frequency'] = channel_elem.attrib['frequency']
             channel['standard'] = channel_elem.attrib['standard']
+            channel['component_id'] = channel_elem.attrib['component_id']
 
             channels.append(channel)
         return channels