Skip to content

Commit

Permalink
print stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Jan 15, 2024
1 parent f27c7c0 commit 3ac37a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/json_to_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def encoded_audio_to_ogg_file(config, encoded_audio, ogg_file_path):
decrypted_audio = aes_cipher.decrypt(
encrypted_bytes[key.size_in_bytes():])
if "Ogg" == decrypted_audio[:3].decode():
print("Ogg decrypted")
print("Ogg decrypted to %s" % ogg_file_path)
else:
raise Exception("Audio not starting with Ogg")
with open(ogg_file_path, "wb") as out_fp:
Expand Down Expand Up @@ -87,7 +87,10 @@ def main():
args_cp = copy.copy(args)
args_cp.document_gz = os.path.join(args.document_gz, document)
args_cp.ogg_file = os.path.join(args.document_gz, document[:document.rfind(".json.gz")]+".ogg")
get_sf(args_cp)
try:
get_sf(args_cp)
except KeyError as e:
print("Cannot read %s" % document)
else:
if args.document_gz.endswith(".json.gz"):
get_sf(args)
Expand Down

0 comments on commit 3ac37a7

Please sign in to comment.