[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 07 of 10] libxl: IDL: bring command line handling in genwrap.py into one place



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1308845948 -3600
# Node ID 956eef6b25e72a6fb76c43813c4367c29a9860cb
# Parent  273be439b67afbeefdf00e68efb5b09412a25c82
libxl: IDL: bring command line handling in genwrap.py into one place.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 273be439b67a -r 956eef6b25e7 tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py   Thu Jun 23 17:18:53 2011 +0100
+++ b/tools/libxl/gentypes.py   Thu Jun 23 17:19:08 2011 +0100
@@ -137,14 +137,14 @@ def libxl_C_enum_from_string(ty, str, e,
     
 
 if __name__ == '__main__':
-    if len(sys.argv) < 4:
+    if len(sys.argv) != 4:
         print >>sys.stderr, "Usage: gentypes.py <idl> <header> 
<implementation>"
         sys.exit(1)
 
-    idl = sys.argv[1]
+    (_, idl, header, impl) = sys.argv
+
     (_,types) = libxltypes.parse(idl)
                     
-    header = sys.argv[2]
     print "outputting libxl type definitions to %s" % header
 
     f = open(header, "w")
@@ -174,7 +174,6 @@ if __name__ == '__main__':
     f.write("""#endif /* __LIBXL_TYPES_H */\n""")
     f.close()
     
-    impl = sys.argv[3]
     print "outputting libxl type implementations to %s" % impl
 
     f = open(impl, "w")

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.