FreeBSD Bugzilla – Attachment 219568 Details for
Bug 251054
net-mgmt/flow-tools: errors with Python 3.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-flow-rpt2rrd
patch-flow-rpt2rrd (text/plain), 2.44 KB, created by
Volodymyr Pushkar
on 2020-11-11 18:01:47 UTC
(
hide
)
Description:
patch-flow-rpt2rrd
Filename:
MIME Type:
Creator:
Volodymyr Pushkar
Created:
2020-11-11 18:01:47 UTC
Size:
2.44 KB
patch
obsolete
>--- bin/flow-rpt2rrd.orig 2020-11-11 19:41:29.441587000 +0200 >+++ bin/flow-rpt2rrd 2020-11-11 19:48:11.498009000 +0200 >@@ -4,7 +4,6 @@ > import os > import rrdtool > import sys >-import string > > # > # flow-rpt2rrd - convert flow-report output to rrd format >@@ -28,7 +27,7 @@ > keys.append(line) > line = f.readline().strip() > f.close() >- return string.join(keys, ',') >+ return keys.join(',') > > # > # Class: ftsym >@@ -117,13 +116,13 @@ > > def set_use_fields(self,f): > self.use_fields = {} >- for i in string.split(f, ','): >+ for i in f.split(','): > self.use_fields[i] = 1 > > def set_use_key_names(self,f): > self.use_key_names = {} > self.use_key_names_special = {} >- for i in string.split(f, ','): >+ for i in f.split(','): > if i[:6] == 'total_': > self.use_key_names_special[i] = 1 > else: >@@ -141,7 +140,7 @@ > > def setrrd(self, storage, path, postfix): > (self.rrd_5min, self.rrd_30min, self.rrd_2hr, self.rrd_1day) = \ >- string.split(storage,':') >+ storage.split(':') > self.rrd_path = path > self.rrd_postfix = postfix > >@@ -179,7 +178,7 @@ > > rrdtool.create(rrdFile, *rrdParams) > if self.debug: >- print >>sys.stderr, string.join(rrdParams,' ') >+ print >>sys.stderr, rrdParams.join(' ') > > # foreach value > >@@ -208,14 +207,14 @@ > if (not self.in_data) : > > if line[:13] == '# first-flow:': >- self.start_time = (string.split(line[14:]))[0] >+ self.start_time = line[14:].split()[0] > > # handle the totals record differently > if line[:53] == '# rec1: records,ignores,flows,octets,packets,duration': >- tmp = string.split(line[8:], ',') >+ tmp = line[8:].split(',') > line = f.readline().strip() > tmp_use_fields_index = {} >- tmp_splt = string.split(line, ',') >+ tmp_splt = line.split(',') > x = 0 > ds = 0 > for i in tmp: >@@ -232,7 +231,7 @@ > self.in_data = 1 > > # foreach element in field names >- for i in string.split(line[8:],','): >+ for i in line[8:].split(','): > > # remove key designators > if i[-1:] == '*': >@@ -267,7 +266,7 @@ > # if in the data area and not a comment, store it > if self.in_data and line [:1] != '#': > >- splt = string.split(line, ',') >+ splt = line.split(',') > > # combine the key fields to form one key > k = ''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251054
:
219567
|
219568
|
219569
|
219570
|
221834
|
222203