Fix indentation
This commit is contained in:
parent
182129b695
commit
cdb9708b63
41
git-sound.py
41
git-sound.py
@ -326,42 +326,41 @@ if __name__ == '__main__':
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.scale is None and args.program != 'list':
|
||||
if args.scale is None and args.program != 'list':
|
||||
print("Please specify a scale!")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
if args.program is None and args.scale != 'list':
|
||||
if args.program is None and args.scale != 'list':
|
||||
print("Please specify a program!")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
if args.scale == 'list':
|
||||
if args.scale == 'list':
|
||||
for scale in scales.keys():
|
||||
print(scale)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
if args.program == 'list':
|
||||
if args.program == 'list':
|
||||
for program in programs.keys():
|
||||
print(program)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
if args.scale not in scales:
|
||||
print("{} is an unknown scale. Use 'list' to list the available scales." \
|
||||
.format(args.scale))
|
||||
if args.scale not in scales:
|
||||
print("{} is an unknown scale.".format(args.scale))
|
||||
print("Use 'list' to list the available scales.")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
if args.program not in programs:
|
||||
print(("{} is an unknown program. " +
|
||||
"Use 'list' to list the available programs.") \
|
||||
.format(args.program))
|
||||
if args.program not in programs:
|
||||
print("{} is an unknown program.".format(args.program))
|
||||
print("Use 'list' to list the available programs.")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
try:
|
||||
repo_midi = GitMIDI(repository=args.repository,
|
||||
branch=args.branch,
|
||||
verbose=args.verbose,
|
||||
@ -369,28 +368,28 @@ try:
|
||||
program=programs[args.program],
|
||||
volume_range=args.volume_range)
|
||||
|
||||
except InvalidGitRepositoryError:
|
||||
print("{} is not a valid Git repository".format(
|
||||
os.path.abspath(args.repository)))
|
||||
except InvalidGitRepositoryError:
|
||||
print("{} is not a valid Git repository" \
|
||||
.format(os.path.abspath(args.repository)))
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
except IndexError:
|
||||
except IndexError:
|
||||
print("Branch '{}' does not exist in this repo".format(args.branch))
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
repo_midi.gen_repo_data()
|
||||
repo_midi.generate_midi()
|
||||
repo_midi.write_mem()
|
||||
repo_midi.gen_repo_data()
|
||||
repo_midi.generate_midi()
|
||||
repo_midi.write_mem()
|
||||
|
||||
if args.file:
|
||||
if args.file:
|
||||
if args.verbose:
|
||||
print("Saving file to {}".format(args.file))
|
||||
|
||||
repo_midi.export_file(args.file)
|
||||
|
||||
if args.play:
|
||||
if args.play:
|
||||
if args.verbose:
|
||||
print("Playing!")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user