Skip to content

Commit

Permalink
Handles "--version" argument via argparser.
Browse files Browse the repository at this point in the history
  • Loading branch information
sundarcf committed Oct 31, 2017
1 parent 94f8d9b commit 4c55314
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions edx_dl/edx_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,12 @@ def parse_args():
help='print lots of debug information')

parser.add_argument('--version',
dest='version',
action='store_true',
default=False,
action='version',
version=__version__,
help='display version and exit')

args = parser.parse_args()

if args.version:
print(__version__)
sys.exit(ExitCode.OK)

# Initialize the logging system first so that other functions
# can use it right away.
Expand Down

0 comments on commit 4c55314

Please sign in to comment.