]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#777,!464] Minor python changes after review:
authorTomek Mrugalski <tomasz@isc.org>
Wed, 7 Aug 2019 10:57:58 +0000 (12:57 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 7 Aug 2019 10:58:10 +0000 (12:58 +0200)
 - removed commented out code
 - better check for first character

doc/sphinx/api2doc.py

index 3c5f17040c1f20fbdd06b825a683c92aa913f8d8..55b9079a88b03eb065a1b2acf39a812d5c38e487 100755 (executable)
@@ -30,7 +30,7 @@ def read_input_files(files):
     for f in files:
         name = os.path.basename(f)[:-5]
         # Skip special names starting with _ (such as _template.json)
-        if name[:1] == '_':
+        if name[0] == '_':
             print("Skipping %s (starts with underscore)" % f)
             continue
         with open(f) as fp:
@@ -149,9 +149,6 @@ API Reference
                 for line in resp_syntax:
                     rst += '    %s\n' % line
 
-                #txt = json.dumps(resp_syntax, indent=4, separators=(',', ': '))
-                #lines = [ '    %s' % l for l in txt.splitlines()]
-                #rst += '\n'.join(lines)
         else:
             rst += '   {\n'
             rst += '       "result": "<integer>",\n'