summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-11-19 10:49:40 +0000
committerNoel Power <npower@samba.org>2018-12-10 10:38:23 +0100
commitb920d80ecaeee98c5e562a2c0b384fe8ace635d4 (patch)
tree5b5fc01efb0c585413839a31805a2e33bb81d573
parentdd62f4b66760e574be568516c087e04577121a94 (diff)
downloadsamba-b920d80ecaeee98c5e562a2c0b384fe8ace635d4.tar.gz
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>
-rwxr-xr-xscript/traffic_learner10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/traffic_learner b/script/traffic_learner
index fd5affd609b..1abfdf7b37b 100755
--- a/script/traffic_learner
+++ b/script/traffic_learner
@@ -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: