Ejemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        if 'load_configuration' in kwargs:
            arg = kwargs['load_configuration']
            if not isinstance(arg, (int, long)):
                if isinstance(arg, bool):
                    if arg:
                        kwargs['load_configuration'] = 1
                    else:
                        kwargs['load_configuration'] = 0
                    # kwargs['load_configuration'] = 1 if arg else 0
                else:
                    raise VistrailsInternalError("Cannot convert "
                                                 "load_configuration")

        DBPackage.__init__(self, *args, **kwargs)
        self.set_defaults()
        self._force_no_unload = None
        self._force_unload = None
        self._force_sys_unload = None
        self._imports_are_good = True
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        if 'load_configuration' in kwargs:
            arg = kwargs['load_configuration']
            if not isinstance(arg, (int, long)):
                if isinstance(arg, bool):
                    if arg:
                        kwargs['load_configuration'] = 1
                    else:
                        kwargs['load_configuration'] = 0
                    # kwargs['load_configuration'] = 1 if arg else 0
                else:
                    raise VistrailsInternalError("Cannot convert "
                                                 "load_configuration")

        DBPackage.__init__(self, *args, **kwargs)
        self.set_defaults()
        self._force_no_unload = None
        self._force_unload = None
        self._force_sys_unload = None
        self._imports_are_good = True
Ejemplo n.º 3
0
 def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
     cp = DBPackage.do_copy(self, new_ids, id_scope, id_remap)
     cp.__class__ = Package
     cp.set_defaults(self)
Ejemplo n.º 4
0
 def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
     cp = DBPackage.do_copy(self, new_ids, id_scope, id_remap)
     cp.__class__ = Package
     cp.set_defaults(self)