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

Public GIT Repository
[python/pep8] Avoid wildcard imports.
[simgrid.git] / examples / python / exec-async / exec-async.py
index 1f74851dd5ef490541c4a50c298684cc90f0cd99..6132e636984f285446a4a9b6f3d00a36b050375d 100644 (file)
@@ -3,8 +3,8 @@
 # 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 Actor, Engine, Host, this_actor
 import sys
-from simgrid import *
 
 
 class Waiter:
@@ -54,6 +54,8 @@ class Canceller:
 
 if __name__ == '__main__':
     e = Engine(sys.argv)
+    if len(sys.argv) < 2:
+        raise AssertionError("Usage: exec-async.py platform_file [other parameters]")
 
     e.load_platform(sys.argv[1])