From 2822998cada989b15288cbe9247fc7953e7607df Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 12 Jul 2018 03:38:08 +0000 Subject: [PATCH] A couple of missed py3 items: execfile, iteritems --- bin/mn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mn b/bin/mn index 24dd6fb..df82b89 100755 --- a/bin/mn +++ b/bin/mn @@ -186,8 +186,9 @@ class MininetRunner( object ): for fileName in files: customs = {} if os.path.isfile( fileName ): - execfile( fileName, customs, customs ) - for name, val in customs.iteritems(): + exec( compile ( open( fileName ).read(), fileName, 'exec' ), + customs, customs ) + for name, val in customs.items(): self.setCustom( name, val ) else: raise Exception( 'could not find custom file: %s' % fileName )