1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-18 06:04:06 +03:00

script: PY3 port traffic_learner

Use python3 compatable print

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power 2018-11-19 10:49:40 +00:00 committed by Noel Power
parent dd62f4b667
commit b920d80eca

View File

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
import sys
import argparse
@ -37,12 +37,12 @@ def main():
args = parser.parse_args()
if not args.out:
print >> sys.stdout, "No output file was specified to write the model to."
print >> sys.stdout, "Please specify a filename using the --out option."
print("No output file was specified to write the model to.", file=sys.stdout)
print("Please specify a filename using the --out option.", file=sys.stdout)
return
if args.SUMMARY_FILE is sys.stdin:
print >> sys.stderr, "reading from STDIN..."
print("reading from STDIN...", file=sys.stderr)
(conversations,
interval,
@ -51,7 +51,7 @@ def main():
dns_mode=args.dns_mode)
model = traffic.TrafficModel()
print >> sys.stderr, "learning model"
print("learning model", sys.stderr)
if args.dns_mode == 'count':
model.learn(conversations, dns_counts)
else: