- global args
-
- parser = argparse.ArgumentParser(description='')
-
- parser.add_argument('--flags',
- dest='part_flags',
- action='store',
- type=auto_int,
- help='Partition Flags')
-
- parser.add_argument('--id',
- dest='part_id',
- action='store',
- type=auto_int,
- help='Partition ID')
-
- parser.add_argument('--input-file',
- dest='input_file',
- action='store',
- type=str,
- help='Input file')
-
- parser.add_argument('--output-file',
- dest='output_file',
- action='store',
- type=str,
- help='Output file')
-
- parser.add_argument('--name',
- dest='part_name',
- action='store',
- type=str,
- help='Partition Name')
-
- parser.add_argument('--version',
- dest='part_version',
- action='store',
- type=str,
- help='Partition Version')
-
- args = parser.parse_args()
-
- if ((not args.part_flags) or
- (not args.part_id) or
- (not args.input_file) or
- (not args.output_file) or
- (not args.part_name) or
- (not args.part_version)):
- parser.print_help()
- else:
- create_output(args)
+ global args
+
+ parser = argparse.ArgumentParser(description="")
+
+ parser.add_argument(
+ "--flags",
+ dest="part_flags",
+ action="store",
+ type=auto_int,
+ help="Partition Flags",
+ )
+
+ parser.add_argument(
+ "--id",
+ dest="part_id",
+ action="store",
+ type=auto_int,
+ help="Partition ID",
+ )
+
+ parser.add_argument(
+ "--input-file",
+ dest="input_file",
+ action="store",
+ type=str,
+ help="Input file",
+ )
+
+ parser.add_argument(
+ "--output-file",
+ dest="output_file",
+ action="store",
+ type=str,
+ help="Output file",
+ )
+
+ parser.add_argument(
+ "--name",
+ dest="part_name",
+ action="store",
+ type=str,
+ help="Partition Name",
+ )
+
+ parser.add_argument(
+ "--version",
+ dest="part_version",
+ action="store",
+ type=str,
+ help="Partition Version",
+ )
+
+ args = parser.parse_args()
+
+ if (
+ (not args.part_flags)
+ or (not args.part_id)
+ or (not args.input_file)
+ or (not args.output_file)
+ or (not args.part_name)
+ or (not args.part_version)
+ ):
+ parser.print_help()
+ else:
+ create_output(args)
+