function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def test_invoice_line_data_prepares_invoice_line(self): """ It should prepare invoice line based on sale line """ qty = 20 with mock.patch.object(self.unit, 'binder_for'): line_id = self.unit.binder_for().to_odoo().sale_line_id line_id.product_uom_qty = qty se...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def setUp(self): super(TestAccountInvoiceLineImporter, self).setUp() self.Unit = account_invoice_line.AccountInvoiceLineImporter self.unit = self.Unit(self.mock_env) self.unit.carepoint_record = self.record
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def test_after_import_get_binder_procurement(self): """ It should get binder for record type """ with mock.patch.object(self.unit, 'binder_for'): self.unit.binder_for.side_effect = EndTestException with self.assertRaises(EndTestException): self.unit._after_import(...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def test_after_import_get_binder_sale(self): """ It should get binder for record type """ with mock.patch.object(self.unit, 'binder_for'): self.unit.binder_for.side_effect = [mock.MagicMock(), EndTestException] with self.assertRaise...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def test_after_import_gets_proc_unit(self): """ It should get unit for model """ with mock.patch.multiple( self.unit, binder_for=mock.DEFAULT, unit_for=mock.DEFAULT ): self.unit.unit_for.side_effect = EndTestException with self.assertRaises(EndTestException): ...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def test_after_import_gets_ref_for_cp_state(self): """ It should get reference for carepoint state record """ with mock.patch.multiple( self.unit, binder_for=mock.DEFAULT, unit_for=mock.DEFAULT, session=mock.DEFAULT, _get_binding=mock.DEFAULT, ): invoice_id = ...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def test_after_import_invoice_create_moves(self): """ It should create accounting moves for newly paid invoices """ with mock.patch.multiple( self.unit, binder_for=mock.DEFAULT, unit_for=mock.DEFAULT, session=mock.DEFAULT, _get_binding=mock.DEFAULT, ): invoice...
laslabs/odoo-connector-carepoint
[ 1, 1, 1, 2, 1449883667 ]
def index(request): """The main page.""" form = forms.MapSearchForm(request.GET) job_list = (models.MapRenderingJob.objects.all() .order_by('-submission_time')) job_list = (job_list.filter(status=0) | job_list.filter(status=1)) return render(request, ...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def privacy(request): """The privacy statement page.""" return render(request, 'maposmatic/privacy.html', { } )
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def documentation_api(request): """The api documentation.""" return render(request, 'maposmatic/documentation-api.html', { } )
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def donate_thanks(request): """The thanks for donation page.""" return render_to_response('maposmatic/donate-thanks.html')
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def new(request): """The map creation page and form.""" papersize_buttons = '' if request.method == 'POST': form = forms.MapRenderingJobForm(request.POST, request.FILES) if form.is_valid(): request.session['new_layout'] = form.cleaned_data.get('layout') request.sess...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def maps(request, category=None): """Displays all maps and jobs, sorted by submission time, or maps matching the search terms when provided.""" map_list = None form = forms.MapSearchForm(request.GET) if form.is_valid(): map_list = (models.MapRenderingJob.objects .order_...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def cancel(request): if request.method == 'POST': form = forms.MapCancelForm(request.POST) if form.is_valid(): job = get_object_or_404(models.MapRenderingJob, id=form.cleaned_data['id'], nonce=form.cleaned_data['nonc...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def api_nominatim_reverse(request, lat, lon): """Nominatim reverse geocoding query gateway.""" lat = float(lat) lon = float(lon) return HttpResponse(json.dumps(nominatim.reverse_geo(lat, lon)), content_type='text/json')
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def api_geosearch(request): """Simple place name search.""" exclude = request.GET.get('exclude', '') squery = request.GET.get('q', '') squery = squery.lower() contents = { "entries": [] } cursor = None if www.settings.MAX_BOUNDING_BOX: m = www.settings.MAX_BOUNDING_BOX ma...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def api_bbox(request, osm_id): """API handler that returns the bounding box from an OSM ID polygon.""" try: osm_id = int(osm_id) except ValueError: return HttpResponseBadRequest("ERROR: Invalid arguments") renderer = ocitysmap.OCitySMap(www.settings.OCITYSMAP_CFG_PATH) try: ...
hholzgra/maposmatic
[ 55, 13, 55, 51, 1452704745 ]
def do_work(file,mintime,wayness,lariat_dict): retval=(None,None,None,None,None) res=plot.get_data(file,mintime,wayness,lariat_dict)
ubccr/tacc_stats
[ 1, 2, 1, 1, 1377871038 ]
def main(): parser = argparse.ArgumentParser(description='Look for imbalance between' 'hosts for a pair of keys') parser.add_argument('filearg', help='File, directory, or quoted' ' glob pattern', nargs='?',default='jobs') parser.add_argument('-p', help='Se...
ubccr/tacc_stats
[ 1, 2, 1, 1, 1377871038 ]
def __init__(self): super(MensagemRetorno, self).__init__() self.Codigo = TagCaracter(nome=u'Codigo', tamanho=[1, 4], raiz=u'/[nfse]') self.Mensagem = TagCaracter(nome=u'Mensagem', tamanho=[1, 200], raiz=u'/[nfse]') self.Correcao = TagCaracter(nome=u'Correcao', tamanho=[0, 200], raiz=u'/...
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<MensagemRetorno>' xml += self.Codigo.xml xml += self.Mensagem.xml xml += self.Correcao.xml
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.Codigo.xml = arquivo self.Mensagem.xml = arquivo self.Correcao.xml = arquivo
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self): super(MensagemRetornoLote, self).__init__() self.IdentificacaoRps = IdentificacaoRps() self.Codigo = TagCaracter(nome=u'Codigo', tamanho=[1, 4], raiz=u'/[nfse]') self.Mensagem = TagCaracter(nome=u'Mensagem', tamanho=[1, 200], raiz=u'/[nfse]')
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<MensagemRetornoLote>' xml += self.IdentificacaoRps.xml xml += self.Codigo.xml xml += self.Mensagem.xml
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.IdentificacaoRps.xml = arquivo self.Codigo.xml = arquivo self.Mensagem.xml = arquivo
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self): super(ListaMensagemRetornoLote, self).__init__() self.MensagemRetornoLote = []
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.MensagemRetornoLote = self.le_grupo('[nfse]//ListaMensagemRetornoLote/MensagemRetornoLote', MensagemRetornoLote)
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self): super(ListaMensagemRetorno, self).__init__() self.MensagemRetorno = []
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.MensagemRetorno = self.le_grupo('[nfse]//ListaMensagemRetorno/MensagemRetorno', MensagemRetorno)
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self): super(ConsultarSituacaoLoteRpsEnvio, self).__init__() self.versao = TagDecimal(nome=u'ConsultarSituacaoLoteRpsEnvio', propriedade=u'versao', namespace=NAMESPACE_NFSE, valor=u'1.00', raiz=u'/') self.Prestador = IdentificacaoPrestador() self.Protocolo = TagCaracter(nom...
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ConsultarSituacaoLoteRpsEnvio xmlns="'+ NAMESPACE_NFSE + '">' xml += self.Prestador.xml.replace(ABERTURA, u'') xml += self.Protocolo.xml
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.Prestador.xml = arquivo self.Protocolo.xml = arquivo
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self): super(ConsultarSituacaoLoteRpsResposta, self).__init__() self.NumeroLote = TagInteiro(nome=u'NumeroLote', tamanho=[1, 15], raiz=u'/') self.Situacao = TagInteiro(nome=u'Situacao', tamanho=[1, 1], raiz=u'/') self.ListaMensagemRetorno = ListaMensagemRetorno()
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ConsultarSituacaoLoteRpsResposta xmlns="'+ NAMESPACE_NFSE + '">' xml += self.NumeroLote.xml xml += self.Situacao.xml xml += self.ListaMensagemRetorno.xml.replace(ABERTURA, u'')
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def set_xml(self, arquivo): if self._le_xml(arquivo): self.NumeroLote.xml = arquivo self.Situacao.xml = arquivo self.ListaMensagemRetorno.xml = arquivo
thiagopena/PySIGNFe
[ 43, 35, 43, 4, 1480611950 ]
def __init__(self, system): """ Initialize a hsms linktest response. :param system: message ID :type system: integer **Example**:: >>> import secsgem.hsms >>> >>> secsgem.hsms.HsmsLinktestRspHeader(10) HsmsLinktestRspHeader({sess...
bparzella/secsgem
[ 119, 67, 119, 20, 1423603517 ]
def _play(input, fs): if input.ndim == 1: input = input[np.newaxis, :] nc = 1 elif input.ndim == 2: nc = input.shape[0] else: raise ValueError, \ "Only input of rank 1 and 2 supported for now." dev = AlsaDevice(fs=fs, nch...
cournape/audiolab
[ 141, 45, 141, 32, 1237912807 ]
def _play(input, fs): if input.ndim == 1: input = input[np.newaxis, :] nc = 1 elif input.ndim == 2: nc = input.shape[0] else: raise ValueError, \ "Only input of rank 1 and 2 supported for now." dev = CoreAudioDevice(fs=fs...
cournape/audiolab
[ 141, 45, 141, 32, 1237912807 ]
def _play(input, fs): raise NotImplementedError, \ "No Backend implemented for your platform " \ "(detected platform is: %s)" % sys.platform
cournape/audiolab
[ 141, 45, 141, 32, 1237912807 ]
def __init__(self,user,subuser): self.subuser = subuser Service.__init__(self,user,subuser) self.name = "xpra"
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getSubuserSpecificServerPermissions(self): """ Get the dictionary of permissions that are specific to this particular subuser and therefore are not packaged in the xpra server image source. """ permissions = OrderedDict() permissions["system-dirs"] = OrderedDict( [ (self.getXpr...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def setupServerPermissions(self): permissions = self.getServerSubuser().permissions for key,value in self.getSubuserSpecificServerPermissions().items(): permissions[key] = value permissions.save()
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def arePermissionsUpToDate(self): areClientPermissionsUpToDate = isSubDict(self.getSubuserSpecificClientPermissions(),self.getClientSubuser().permissions) if not areClientPermissionsUpToDate: self.user.registry.log("Client permissions:\n"+str(self.getClientSubuser().permissions)+ "\n differ from defaults:...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getXpraVolumePath(self): return os.path.join(self.user.config["volumes-dir"],"xpra",self.subuser.name)
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getXpraHomeDir(self): return os.path.join(self.getXpraVolumePath(),"xpra-home")
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getXpraSocket(self): return os.path.join(self.getXpraHomeDir(),".xpra",self.getServerSubuserHostname()+"-100")
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getServerSubuserName(self): return "!service-subuser-"+self.subuser.name+"-xpra-server"
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def _getPermissionsAccepter(self): from subuserlib.classes.permissionsAccepters.acceptPermissionsAtCLI import AcceptPermissionsAtCLI return AcceptPermissionsAtCLI(self.user,alwaysAccept=True)
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def getClientSubuserName(self): return "!service-subuser-"+self.subuser.name+"-xpra-client"
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def addClientSubuser(self): subuserlib.subuser.addFromImageSourceNoVerify(self.user,self.getClientSubuserName(),self.user.registry.repositories["default"]["subuser-internal-xpra-client"]) self.subuser.serviceSubuserNames.append(self.getClientSubuserName()) self.getClientSubuser().createPermissions(self.getC...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def createAndSetupSpecialVolumes(self,errorCount=0): def clearAndTryAgain(): if errorCount >= 5: sys.exit("Failed to setup XPRA bridge volumes. You have some permissions errors with your subuser volumes directory."+self.getXpraVolumePath()+" Look at the output above and try to resolve the problem your...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def waitForContainerToLaunch(self, readyString, process, suppressOutput): while True: where = process.stderr_file.tell() line = process.stderr_file.readline() while (not line):# or (line[-1:] != '\n'): time.sleep(0.1) process.stderr_file.seek(where) line = process.stderr_fi...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def isRunning(self,serviceStatus): def isContainerRunning(cid): container = self.user.dockerDaemon.getContainer(cid) containerStatus = container.inspect() if containerStatus is None: return False else: if not containerStatus["State"]["Running"]: #Clean up left over ...
subuser-security/subuser
[ 880, 66, 880, 40, 1391987856 ]
def __init__(self): super(DummyKnittingPlugin, self).__init__()
fashiontec/knitlib
[ 1529, 13, 1529, 7, 1432366551 ]
def onknit(self, e): logging.debug(DummyKnittingPlugin.base_log_string.format("onknit")) # In order to simulate blocking we make it sleep. total = 5 for i in range(total): time.sleep(1) self.interactive_callbacks["progress"](i / float(total), i, total) self.finish()
fashiontec/knitlib
[ 1529, 13, 1529, 7, 1432366551 ]
def onconfigure(self, e): logging.debug(DummyKnittingPlugin.base_log_string.format("onconfigure"))
fashiontec/knitlib
[ 1529, 13, 1529, 7, 1432366551 ]
def __init__(self): self._bus = pydbus.SessionBus()
cyanogen/uchroma
[ 46, 10, 46, 17, 1481916427 ]
def get_device(self, identifier): if identifier is None: return None use_key = False if isinstance(identifier, str): if identifier.startswith(BASE_PATH): return self._bus.get(SERVICE, identifier) if re.match(r'\w{4}:\w{4}.\d{2}', identifier):...
cyanogen/uchroma
[ 46, 10, 46, 17, 1481916427 ]
def write(self, msg): pass
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def usage(code, msg=''): print >> sys.stderr, __doc__ % globals() if msg: print >> sys.stderr, msg sys.exit(code)
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def __init__(self, server, conn, addr): asynchat.async_chat.__init__(self, conn) self.__server = server self.__conn = conn self.__addr = addr self.__line = [] self.__state = self.COMMAND self.__greeting = 0 self.__mailfrom = None self.__rcpttos = [...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def push(self, msg): asynchat.async_chat.push(self, msg + '\r\n')
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def collect_incoming_data(self, data): self.__line.append(data)
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def found_terminator(self): line = EMPTYSTRING.join(self.__line) print >> DEBUGSTREAM, 'Data:', repr(line) self.__line = [] if self.__state == self.COMMAND: if not line: self.push('500 Error: bad syntax') return method = None ...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def smtp_HELO(self, arg): if not arg: self.push('501 Syntax: HELO hostname') return if self.__greeting: self.push('503 Duplicate HELO/EHLO') else: self.__greeting = arg self.push('250 %s' % self.__fqdn)
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def smtp_QUIT(self, arg): # args is ignored self.push('221 Bye') self.close_when_done()
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def __getaddr(self, keyword, arg): address = None keylen = len(keyword) if arg[:keylen].upper() == keyword: address = arg[keylen:].strip() if not address: pass elif address[0] == '<' and address[-1] == '>' and address != '<>': #...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def smtp_RCPT(self, arg): print >> DEBUGSTREAM, '===> RCPT', arg if not self.__mailfrom: self.push('503 Error: need MAIL command') return address = self.__getaddr('TO:', arg) if arg else None if not address: self.push('501 Syntax: RCPT TO: <address>') ...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def smtp_DATA(self, arg): if not self.__rcpttos: self.push('503 Error: need RCPT command') return if arg: self.push('501 Syntax: DATA') return self.__state = self.DATA self.set_terminator('\r\n.\r\n') self.push('354 End data with <C...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def __init__(self, localaddr, remoteaddr): self._localaddr = localaddr self._remoteaddr = remoteaddr asyncore.dispatcher.__init__(self) try: self.create_socket(socket.AF_INET, socket.SOCK_STREAM) # try to re-use a server port if possible self.set_reuse...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def process_message(self, peer, mailfrom, rcpttos, data): """Override this abstract method to handle messages from the client. peer is a tuple containing (ipaddr, port) of the client that made the socket connection to our smtp port. mailfrom is the raw address the client claims the mes...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def process_message(self, peer, mailfrom, rcpttos, data): inheaders = 1 lines = data.split('\n') print '---------- MESSAGE FOLLOWS ----------' for line in lines: # headers first if inheaders and not line: print 'X-Peer:', peer[0] in...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def process_message(self, peer, mailfrom, rcpttos, data): lines = data.split('\n') # Look for the last header i = 0 for line in lines: if not line: break i += 1 lines.insert(i, 'X-Peer: %s' % peer[0]) data = NEWLINE.join(lines) ...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def process_message(self, peer, mailfrom, rcpttos, data): from cStringIO import StringIO from Mailman import Utils from Mailman import Message from Mailman import MailList # If the message is to a Mailman mailing list, then we'll invoke the # Mailman script directly, with...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def parseargs(): global DEBUGSTREAM try: opts, args = getopt.getopt( sys.argv[1:], 'nVhc:d', ['class=', 'nosetuid', 'version', 'help', 'debug']) except getopt.error, e: usage(1, e) options = Options() for opt, arg in opts: if opt in ('-h', '--help'): ...
vFense/vFenseAgent-nix
[ 6, 2, 6, 10, 1393869099 ]
def dottedquad_to_num(ip): """ Convert decimal dotted quad string IP to long integer """ return struct.unpack('!L',socket.inet_aton(ip))[0]
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def unique_match_from_list(list): """ Check the list for a potential pattern match @param list : a list of potential matching groups
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def extract_matching_pattern(regex, group_name, unfiltered_list): """ Return the desired group_name from a list of matching patterns @param regex : a regular expression with named groups @param group_name : the desired matching group name value @param unfiltered_list : a list of mat...
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def __init__(self, ip, fqdn=''): self.ip_dottedquad = ip self.ip_num = dottedquad_to_num(ip) self.fqdn = fqdn self.rdns = '' self.ports = [] self.os = '' self.mac_address = '' self.mac_address_vendor = '' self.network_distance = ''
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def add_port(self, port): self.ports.append(port)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_ip_num_format(self): return str(self.ip_num)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_ip_dotted_format(self): return str(self.ip_dottedquad)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_fqdn(self): return str(self.fqdn)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_rdns_record(self): return str(self.rdns)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_port_list(self): return self.ports
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_port_number_list(self): if not(self.get_port_list()): return [''] else: result = [] for port in self.get_port_list(): result.append(port.get_number()) return result
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_port_protocol_list(self): if not(self.get_port_list()): return [''] else: result = [] for port in self.get_port_list(): result.append(port.get_protocol()) return result
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_port_version_list(self): if not(self.get_port_list()): return [''] else: result = [] for port in self.get_port_list(): result.append(port.get_version()) return result
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_os(self): return str(self.os)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_mac_address(self): return str(self.mac_address)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_mac_address_vendor(self): return str(self.mac_address_vendor)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_network_distance(self): return str(self.network_distance)
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def set_fqdn(self, fqdn): self.fqdn = fqdn
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def set_rdns_record(self, rdns_record): self.rdns = rdns_record
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def set_mac(self, mac_address, mac_address_vendor = ''): self.mac_address = mac_address self.mac_address_vendor = mac_address_vendor
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def __init__(self, number, protocol, service='', version='', script=''): self.number = number self.protocol = protocol self.service = service self.version = version self.script = script
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_number(self): return self.number
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_protocol(self): return self.protocol
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_service(self): return self.service
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]
def get_version(self): return self.version
maaaaz/nmaptocsv
[ 350, 93, 350, 5, 1348413900 ]