]> AND Public Git Repository - simgrid.git/blobdiff - examples/python/actor-suspend/actor-suspend.py
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'pikachuyann/simgrid-xbt_random'
[simgrid.git] / examples / python / actor-suspend / actor-suspend.py
index 5fecb46c6ffc9fc50540e817ce078e7d1d9cfea6..95e055b5fe155a78569c9166ad6a978c8af5c58f 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (c) 2017-2019. The SimGrid Team. All rights reserved.
+# Copyright (c) 2017-2020. The SimGrid Team. All rights reserved.
 #
 # This program is free software you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
-from simgrid import *
+from simgrid import Actor, Engine, this_actor
 import sys
 
 
@@ -75,7 +75,7 @@ if __name__ == '__main__':
             "Usage: actor-suspend.py platform_file [other parameters]")
 
     e.load_platform(sys.argv[1])  # Load the platform description
-    list = e.get_all_hosts()
-    Actor.create("dream_master", list[0], dream_master)
+    hosts = e.get_all_hosts()
+    Actor.create("dream_master", hosts[0], dream_master)
 
     e.run()  # Run the simulation