Commits

Travis Shirk committed 17ef55e

Fix --pdb so it works without ipdb installed. Fixes #37.

Comments (0)

Files changed (1)

src/eyed3/main.py

 import eyed3.info
 from eyed3.compat import ConfigParser, ConfigParserError, StringIO
 
+try:
+    import ipdb as pdb
+except ImportError:
+    import pdb
+
 
 DEFAULT_PLUGIN = "classic"
 DEFAULT_CONFIG = eyed3.info.USER_CONFIG
         eyed3.log.exception(ex)
 
         if args.debug_pdb:
-            try:
-                import ipdb as pdb
-            except ImportError:
-                import pdb
-
             e, m, tb = sys.exc_info()
             pdb.post_mortem(tb)
     finally: