Skip to content

Commit

Permalink
#9 Optional arguments fix
Browse files Browse the repository at this point in the history
Default value 0 for the camera number argument now works properly if not specified.
  • Loading branch information
kcuric committed Jan 4, 2020
1 parent e3023f8 commit 0ec907a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

parser = argparse.ArgumentParser()
parser.add_argument('port', metavar='P', type=int, help='Desired port.')
parser.add_argument('--cam', metavar='C', type=int, nargs='?', const=0, help='Desired cam.')
parser.add_argument('--cam', metavar='C', type=int, nargs='?', const=0, help='Desired cam.', default=0)
args = parser.parse_args()

recorder = Recorder(args.cam)
Expand Down

0 comments on commit 0ec907a

Please sign in to comment.