Changeset - 0db89c347000
[Not reviewed]
default
0 1 0
David McClosky - 18 years ago 2007-06-15 17:41:32
dmcc@bigasterisk.com
Submaster: use leveldict kw where we used to just pass leveldicts
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/Submaster.py
Show inline comments
 
@@ -246,7 +246,7 @@ class Submasters:
 
def fullsub(*chans):
 
    """Make a submaster with chans at full."""
 
    return Submaster('%r' % chans,
 
        dict([(c, 1.0) for c in chans]), temporary=True)
 
        leveldict=dict([(c, 1.0) for c in chans]), temporary=True)
 

	
 
# a global instance of Submasters, created on demand
 
_submasters = None
 
@@ -270,14 +270,14 @@ def get_sub_by_name(name, submasters=Non
 

	
 
    try:
 
        val = int(name)
 
        s = Submaster("#%d" % val, {val : 1.0}, temporary=True)
 
        s = Submaster("#%d" % val, leveldict={val : 1.0}, temporary=True)
 
        return s
 
    except ValueError:
 
        pass
 

	
 
    try:
 
        subnum = Patch.get_dmx_channel(name)
 
        s = Submaster("'%s'" % name, {subnum : 1.0}, temporary=True)
 
        s = Submaster("'%s'" % name, leveldict={subnum : 1.0}, temporary=True)
 
        return s
 
    except ValueError:
 
        pass
0 comments (0 inline, 0 general)