Skip to content

Commit 5bbb5e5

Browse files
committed
Removing redundant get_user_response() and restoring required=True for files_group in args
1 parent 40bef60 commit 5bbb5e5

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

transcode.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def evaluate_args():
1919
""" Exits with error messages if command-line arguments are invalid
2020
"""
2121
parser = argparse.ArgumentParser(description="Transcodes given file(s) in .{sep}source{sep} to HEVC format.".format(sep=os.sep))
22-
files_group = parser.add_mutually_exclusive_group()
22+
files_group = parser.add_mutually_exclusive_group(required=True)
2323
files_group.add_argument("--file", help="relative path to movie in source directory")
2424
files_group.add_argument("--all", action="store_true", help="transcode all supported movies in source directory")
2525
parser.add_argument("--quality", type=int, help="HandBrake quality slider value (-12,51)")
@@ -60,21 +60,6 @@ def evaluate_args():
6060

6161
return args
6262

63-
def get_user_response():
64-
""" Accepts yes/no answer as user input and returns answer as boolean
65-
"""
66-
while "need response":
67-
reply = str(input(" Proceed? (y/n) ")).lower().strip()
68-
if len(reply) > 0:
69-
if reply[0] == "y":
70-
response = True
71-
break
72-
if reply[0] == "n":
73-
response = False
74-
break
75-
76-
return response
77-
7863
def build_source_list(args):
7964
""" Constructs and returns list of source files
8065
"""

0 commit comments

Comments
 (0)