Travis Shirk  committed a518a65

Fixed some FIXMEs

  • Participants
  • Parent commits 349c911
  • Branches default

Comments (0)

Files changed (2)

File src/eyed3/plugins/

 from __future__ import print_function
 import os, stat, exceptions
-from eyed3 import Exception as BaseException
+import traceback
 from eyed3 import LOCAL_ENCODING
 from eyed3.plugins import LoaderPlugin
 from eyed3 import core, id3, mp3, utils
-# FIXME: this is unused
-class CommandException(BaseException):
-    '''Used for tag processing errors'''
 class ClassicPlugin(LoaderPlugin):
     SUMMARY = u"Classic eyeD3 interface for viewing and editing tags."
     DESCRIPTION = u"""
                           choices=_encodings, metavar='|'.join(_encodings),
-        # FIXME: move this, it is currently in 'g'
+        # Misc options in the main group
         g.add_argument("--force-update", action="store_true", default=False,
                        dest="force_update", help=ARGS_HELP["--force-update"])
         g.add_argument("-F", dest="field_delim", default=FIELD_DELIM,
                 printWarning("Renamed '%s' to '%s'" % (orig,
-        # FIXME: eyeD3 exceptions should do printError, others should show
-        # traceback
         except exceptions.Exception as ex:
             printError("Error: %s" % ex)
+            log.error(traceback.format_exc())
             if self.args.debug_pdb:
                 import pdb; pdb.set_trace()
             return self.R_HALT
                       info.mp3_header.sample_freq, info.mp3_header.mode))
             printMsg("-" * 79)
-        else:
-            # FIXME
-            # Handle what it is known and silently ignore anything else.
-            pass
     def _getDefaultNameForImage(self, image_frame, suffix=""):
         name_str = image_frame.picTypeToString(image_frame.picture_type)
                 if self.args.write_images_dir:
                     img_path = "%s%s" % (self.args.write_images_dir, os.sep)
                     if not os.path.isdir(img_path):
-                        raise CommandException("Directory does not exist: %s" %
-                                               img_path)
+                        raise IOError("Directory does not exist: %s" % img_path)
                     img_file = self._getDefaultNameForImage(img)
                     count = 1
                     while os.path.exists(os.path.join(img_path, img_file)):
                 if self.args.write_objects_dir:
                     obj_path = "%s%s" % (self.args.write_objects_dir, os.sep)
                     if not os.path.isdir(obj_path):
-                        raise CommandException("Directory does not exist: %s" %
-                                               obj_path)
+                        raise IOError("Directory does not exist: %s" % obj_path)
                     obj_file = self._getDefaultNameForObject(obj)
                     count = 1
                     while os.path.exists(os.path.join(obj_path, obj_file)):

File src/eyed3/utils/

     return mime
-# A wrapper around os.walk which handles exclusion patters and unicode
-# conversion.
-# FIXME: document
 def walk(handler, path, excludes=None, fs_encoding=LOCAL_FS_ENCODING):
+    '''A wrapper around os.walk which handles exclusion patterns and unicode
+    conversion. '''
     path = unicode(path, fs_encoding) if type(path) is not unicode else path
     excludes = excludes if excludes else []