[PATCH] Fix gen_tables.py in parsing arguments

AKASHI Takahiro takahiro.akashi at linaro.org
Fri Nov 15 01:07:57 UTC 2013


Hi Clayton

Patch only for my changes, nothing fancy.

-Takahiro AKASHI



action in add_argument() should not be NULL('').

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 lib/gen_tables.py |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/gen_tables.py b/lib/gen_tables.py
index 88039b1..433dd8b 100644
--- a/lib/gen_tables.py
+++ b/lib/gen_tables.py
@@ -388,19 +388,19 @@ def main():
         
         # Setup the argument parser and parse the arguments given
         parser = argparse.ArgumentParser(description='Generate tables header files.')
-        parser.add_argument('--i2s', dest='gen_i2s', action='',
+        parser.add_argument('--i2s', dest='gen_i2s', action='store_true',
                         help='Generate i2s tables')
-        parser.add_argument('--i2s-transtab', dest='gen_i2s_transtab', action='',
+        parser.add_argument('--i2s-transtab', dest='gen_i2s_transtab', action='store_true',
                         help='Generate transtab tables')
-        parser.add_argument('--s2i', dest='gen_s2i', action='',
+        parser.add_argument('--s2i', dest='gen_s2i', action='store_true',
                         help='Generate s2i tables')
         # Make sure uppercase and lowercase are mutually exclusive
         group = parser.add_mutually_exclusive_group()
-        group.add_argument('--uppercase', dest='uppercase', action='',
+        group.add_argument('--uppercase', dest='uppercase', action='store_true',
                         help='All characters are uppercase')
-        group.add_argument('--lowercase', dest='lowercase', action='',
+        group.add_argument('--lowercase', dest='lowercase', action='store_true',
                         help='All characters are lowercase')
-        parser.add_argument('--duplicate-ints', dest='allow_duplicate_ints', action='',
+        parser.add_argument('--duplicate-ints', dest='allow_duplicate_ints', action='store_true',
                         help='Allow duplicate integers')
         parser.add_argument('prefix', help='The prefix of the output file to use')
         parser.add_argument('source', type=argparse.FileType('r'),
-- 
1.7.9.5




More information about the Linux-audit mailing list