traffic_replay: Exception has no .message
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 27 Oct 2018 21:49:24 +0000 (10:49 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 1 Nov 2018 04:08:13 +0000 (05:08 +0100)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
script/traffic_replay

index 617a746be1bdb9b501fff6794f5dc48f9bb55045..9642ea87d05a695e763fe62b8f31d4510ced1289 100755 (executable)
@@ -254,7 +254,7 @@ def main():
                 duration = opts.duration
 
         except ValueError as e:
-            if not e.message.startswith('need more than'):
+            if not str(e).startswith('need more than'):
                 raise
 
             model = traffic.TrafficModel()