Skip to content
Browse files

Added logging of exceptions from oggpatch console code to oggpatch GUI.

  • Loading branch information...
1 parent f334873 commit 481a970a74524bf3aabc6a94b82fe424fc17dd2f @Vultaire committed Jun 10, 2012
Showing with 7 additions and 4 deletions.
  1. +1 −1 r21buddy/oggpatch.py
  2. +6 −3 r21buddy/oggpatch_gui.py
View
2 r21buddy/oggpatch.py
@@ -208,7 +208,7 @@ def get_packets(pages):
if page.last_page:
break
if len(data) > 0:
- raise UnterminatedPacket("".join(data))
+ raise UnterminatedPacket(repr("".join(data)))
self.pages = list(pages) # Needed to recreate stream with updated final page
View
9 r21buddy/oggpatch_gui.py
@@ -1,4 +1,4 @@
-import os, sys
+import os, sys, traceback
from cStringIO import StringIO
import Tkinter, tkFileDialog, tkMessageBox
from r21buddy import oggpatch
@@ -185,8 +185,11 @@ def execute(self):
"output file name."))
self.hijack_output()
- oggpatch.patch_file(
- input_file, length, output_file=output_file, verbose=True)
+ try:
+ oggpatch.patch_file(
+ input_file, length, output_file=output_file, verbose=True)
+ except:
+ print traceback.format_exc()
self.restore_output()
elif mode == "check":
self.hijack_output()

0 comments on commit 481a970

Please sign in to comment.
Something went wrong with that request. Please try again.