PEP8: fix E303: too many blank lines (2)
[sfrench/samba-autobuild/.git] / script / generate_param.py
index c6ec8bc144871eb82e2977705fe1d1d2cbf1d710..34930494ba374f42ee4cf4880cdb66c7be7a1296 100644 (file)
@@ -36,9 +36,9 @@ parser.add_option("-f", "--file", dest="filename",
 parser.add_option("-o", "--output", dest="output",
                   help='output file', metavar="FILE")
 parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS|PARAMTABLE>",
-                 choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "PARAMTABLE"], default="FUNCTIONS")
+                  choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "PARAMTABLE"], default="FUNCTIONS")
 parser.add_option("--scope", metavar="<GLOBAL|LOCAL>",
-                  choices = ["GLOBAL", "LOCAL"], default="GLOBAL")
+                  choices=["GLOBAL", "LOCAL"], default="GLOBAL")
 
 (options, args) = parser.parse_args()
 
@@ -47,6 +47,7 @@ if options.filename is None:
 if options.output is None:
     parser.error("No output file specified")
 
+
 def iterate_all(path):
     """Iterate and yield all the parameters. 
 
@@ -116,6 +117,7 @@ param_type_dict = {
                     "ustring"      : "_STRING",
                   }
 
+
 def generate_functions(path_in, path_out):
     f = open(path_out, 'w')
     try:
@@ -142,7 +144,7 @@ def generate_functions(path_in, path_out):
             if temp is None:
                 raise Exception(parameter['name'] + " has an invalid param type " + parameter['type'])
             output_string += temp
-            f.write(output_string + "(" + parameter['function'] +", " + parameter['function'] + ')\n')
+            f.write(output_string + "(" + parameter['function'] + ", " + parameter['function'] + ')\n')
     finally:
         f.close()
 
@@ -160,6 +162,7 @@ mapping = {
             'ustring'      : 'char *',
           }
 
+
 def make_s3_param_proto(path_in, path_out):
     file_out = open(path_out, 'w')
     try:
@@ -251,16 +254,17 @@ def make_lib_proto(path_in, path_out):
                 else:
                     raise Exception(parameter['name'] + " has an invalid param type " + parameter['type'])
 
-
             file_out.write(output_string)
     finally:
         file_out.close()
 
+
 def get_header(path):
     header = os.path.basename(path).upper()
     header = header.replace(".", "_").replace("\\", "_").replace("-", "_")
     return "__%s__" % header
 
+
 def make_param_defs(path_in, path_out, scope):
     file_out = open(path_out, 'w')
     try:
@@ -324,6 +328,7 @@ type_dict = {
               "ustring"      : "P_USTRING",
             }
 
+
 def make_param_table(path_in, path_out):
     file_out = open(path_out, 'w')
     try: