Example #1
0
 def __init__(self, library, network):
     LibraryActions.__init__(self, library, network)
     ruleset = library.ruleset
     self.template = ruleset.is_template \
         and bool(network) \
         and network.isEditable() \
         and (not isinstance(network, Group)) \
         and (not network.isGeneric())
Example #2
0
 def __init__(self, library, object):
     LibraryActions.__init__(self, library, object)
     ruleset = library.ruleset
     self.template = (
         (not ruleset.read_only)
         and ruleset.is_template
         and bool(object)
         and object.isEditable()
         and (not isinstance(object, Group))
         and (not object.isGeneric()))