glapi: glX_proto_send.py: use a main function.
authorDylan Baker <baker.dylan.c@gmail.com>
Tue, 10 Feb 2015 23:20:57 +0000 (15:20 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 22 May 2015 18:31:28 +0000 (11:31 -0700)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
src/mapi/glapi/gen/glX_proto_send.py

index ea766afe80af53f5a8c38659cf7e016823e629ae..2b3303078a21c6517d93cab4c6c1ab142c28d2d5 100644 (file)
@@ -1107,7 +1107,8 @@ def _parser():
     return parser.parse_args()
 
 
-if __name__ == '__main__':
+def main():
+    """Main function."""
     args = _parser()
 
     if args.mode == "proto":
@@ -1121,3 +1122,7 @@ if __name__ == '__main__':
     api = gl_XML.parse_GL_API(args.filename, glX_XML.glx_item_factory())
 
     printer.Print( api )
+
+
+if __name__ == '__main__':
+    main()