Ejemplo n.º 1
0
 def __init__(self, host, user, password, name, port=3306):
     Borg.__init__(self)
     self.db_host = host
     self.db_user = user
     self.db_pass = password
     self.db_name = name
     self.port = port
Ejemplo n.º 2
0
    def __init__(self):
        """Class initialiser"""

        Borg.__init__(self, self.__class__.__name__)

        self.prepare_attributes()
        self.load()
Ejemplo n.º 3
0
 def __init__(self, host, user, password, name, port=3306):
     Borg.__init__(self)
     self.db_host = host
     self.db_user = user
     self.db_pass = password
     self.db_name = name
     self.port = port
Ejemplo n.º 4
0
    def __init__(self):
        """Class initialiser"""

        Borg.__init__(self, self.__class__.__name__)

        self.prepare_attributes()
        self.load()
Ejemplo n.º 5
0
 def __init__(self):
     """Class initialiser"""
     Borg.__init__(self, self.__class__.__name__)
     self.prepare_attributes()
     try:
         dbus.service.Object.__init__(self, self.bus_name, BUS_PATH)
     except:
         None
Ejemplo n.º 6
0
 def __init__(self):
     """Class initialiser"""
     Borg.__init__(self, self.__class__.__name__)
     self.prepare_attributes()
     try:
         dbus.service.Object.__init__(self, self.bus_name, BUS_PATH)
     except:
         None
Ejemplo n.º 7
0
 def __init__(self):
     Borg.__init__(self)
     self.files = 0
     self.folders = 0
     self.found = 0
     self.size = 0
     self.minutes = 0
     self.seconds = 0
Ejemplo n.º 8
0
    def __init__(self):
        """Class initialiser"""

        Borg.__init__(self, self.__class__.__name__)

        self.prepare_attributes()
        import optionparse
        self.command_line_options = optionparse.options
        self.load()
Ejemplo n.º 9
0
    def __init__(self):
        """Class initialiser"""

        Borg.__init__(self, self.__class__.__name__)

        self.prepare_attributes()
        import optionparse
        self.command_line_options = optionparse.options
        self.load()
Ejemplo n.º 10
0
 def __init__(self):
     Borg.__init__(self, self.__class__.__name__)
     self.sessionEnding = False
     self.sessionBus = dbus.SessionBus()
     # self.smknown = SMKNOWN.keys()
     #self.smknown = [ 'mock' ]
     self.smknown = ['xfce']
     # FIXME should we check for exact w/o trying one by one?
     self.ok = self.connect()
Ejemplo n.º 11
0
    def __init__(self, nleaflets=None, HID=None, BAUD=None):
        """
        Args:
            HID (str):  USB hardware id, if present: only match exactly and fallback to EMULATOR_MODE otherwise
            BAUD (int): Serial baud rate - must match serial device baud exactly
        """
        Borg.__init__(self)
        QObject.__init__(self)
        if self.__dict__.get('initialized', False):
            return

        self._tserial = None
        self.nleaflets = nleaflets
        self.init_serial_interface(HID, BAUD)
        self.initialized = True
Ejemplo n.º 12
0
    def __init__(self, nleaflets=None, HID=None, BAUD=115200):
        """
        Args:
            HID (str):  USB hardware id, if present: only match exactly and fallback to EMULATOR_MODE otherwise
            BAUD (int): Serial baud rate - must match serial device baud exactly
        """
        Borg.__init__(self)
        if '_fserial' in self.__dict__:
            return

        self._fserial = None
        self.EMULATOR_MODE = False
        self._USB_HID = HID
        self._BAUD = BAUD
        self._nleaflets = nleaflets
        self._init_hw()
Ejemplo n.º 13
0
    def __init__ (self,dir_name=None,ignore_funs=None,elf_only=False):
        Borg.__init__(self)
        if not (dir_name):
           return
        try:
            self.f_text = open('%s/kernel.elf.txt' %dir_name)
            self.f_symtab = open('%s/kernel.elf.symtab' %dir_name)
        except :
            print "kernel.elf.* can't be opened at directory %s" %dir_name
            assert 0
        self.elf_only = elf_only
        if not elf_only:
            self.asm_fs = dict ([(x,functions[x]) for x in functions_by_tag['ASM']]) 
            asm_fs = self.asm_fs
            self.tcg = None
            #from original name to the cloned name
            self.to_clone_name = {}
            self.un_clone_name = {}
            for f in asm_fs:
               if 'clone' in f:
                  match = re.search('(.*)(_clone).*',f)
                  f_name = match.groups()[0]
                  self.to_clone_name[f_name] = f
                  self.un_clone_name[f] = f_name
                #print 'to_clone_name: %s' % self.to_clone_name
        #print 'un_clone_name: %s' % self.un_clone_name

        #self.insts = {}
        #funcs is a dict of func names to elfFunc objs
        self.funcs = {}
        #dict of sym names to sym objects
        self.syms = {}
        #dict of addresses to data
        self.literals = {}
        #addr -> line text
        self.lines = {}
        self.deadend_funcs = deadend_funcs
        self.dir_name = dir_name
        #maps addrs to fun name containing it
        self.addrs_to_f = {}
Ejemplo n.º 14
0
    def __init__ (self,dir_name=None,ignore_funs=None,elf_only=False):
        Borg.__init__(self)
        if not (dir_name):
           return
        try:
            self.f_text = open('%s/kernel.elf.txt' %dir_name)
            self.f_symtab = open('%s/kernel.elf.symtab' %dir_name)
        except :
            print "kernel.elf.* can't be opened at directory %s" %dir_name
            assert 0
        self.elf_only = elf_only
        if not elf_only:
            self.asm_fs = dict ([(x,functions[x]) for x in functions_by_tag['ASM']])
            asm_fs = self.asm_fs
            self.tcg = None
            #from original name to the cloned name
            self.to_clone_name = {}
            self.un_clone_name = {}
            for f in asm_fs:
               if 'clone' in f:
                  match = re.search('(.*)(_clone).*',f)
                  f_name = match.groups()[0]
                  self.to_clone_name[f_name] = f
                  self.un_clone_name[f] = f_name
                #print 'to_clone_name: %s' % self.to_clone_name
        #print 'un_clone_name: %s' % self.un_clone_name

        #self.insts = {}
        #funcs is a dict of func names to elfFunc objs
        self.funcs = {}
        #dict of sym names to sym objects
        self.syms = {}
        #dict of addresses to data
        self.literals = {}
        #addr -> line text
        self.lines = {}
        self.deadend_funcs = deadend_funcs
        self.dir_name = dir_name
        #maps addrs to fun name containing it
        self.addrs_to_f = {}
Ejemplo n.º 15
0
	def __init__(self):
		print "Class created: %s" % self.__class__.__name__
		Borg.__init__(self)
		
		self.gpg = gnupg.GPG(gnupghome=settings.PGPHOMEDIR)
Ejemplo n.º 16
0
 def __init__(self, name=None):
     Borg.__init__(self)
     if name is not None:
         self.name = name
Ejemplo n.º 17
0
 def __init__(self):
     Borg.__init__(self)