def _main(): """Entry point""" initLogging() try: args, _, config = parseCommandLine() eyed3.utils.console.AnsiCodes.init(not args.no_color) mainFunc = main if args.debug_profile is False else profileMain retval = mainFunc(args, config) except KeyboardInterrupt: retval = 0 except (StopIteration, IOError) as ex: eyed3.utils.console.printError(str(ex)) retval = 1 except Exception as ex: eyed3.utils.console.printError("Uncaught exception: %s\n" % str(ex)) eyed3.log.exception(ex) retval = 1 if args.debug_pdb: try: with warnings.catch_warnings(): warnings.simplefilter("ignore", PendingDeprecationWarning) # Must delay the import of ipdb as say as possible because # of https://github.com/gotcha/ipdb/issues/48 import ipdb as pdb except ImportError: import pdb e, m, tb = sys.exc_info() pdb.post_mortem(tb) sys.exit(retval)
def _main(): """Entry point""" initLogging() try: args, _, config = parseCommandLine() eyed3.utils.console.AnsiCodes.init(not args.no_color) mainFunc = main if args.debug_profile is False else profileMain retval = mainFunc(args, config) except KeyboardInterrupt: retval = 0 except (StopIteration, IOError) as ex: eyed3.utils.console.printError(UnicodeType(ex)) retval = 1 except Exception as ex: eyed3.utils.console.printError("Uncaught exception: %s\n" % str(ex)) eyed3.log.exception(ex) retval = 1 if args.debug_pdb: try: with warnings.catch_warnings(): warnings.simplefilter("ignore", PendingDeprecationWarning) # Must delay the import of ipdb as say as possible because # of https://github.com/gotcha/ipdb/issues/48 import ipdb as pdb except ImportError: import pdb e, m, tb = sys.exc_info() pdb.post_mortem(tb) sys.exit(retval)
from __future__ import print_function import os import sys import textwrap import warnings import eyed3 import eyed3.utils import eyed3.utils.console import eyed3.plugins import eyed3.info from eyed3.compat import ConfigParser, ConfigParserError, StringIO from eyed3.utils.log import initLogging initLogging() DEFAULT_PLUGIN = "classic" DEFAULT_CONFIG = eyed3.info.USER_CONFIG def main(args, config): if args.list_plugins: _listPlugins(config) return 0 args.plugin.start(args, config) # Process paths (files/directories) for p in args.paths: eyed3.utils.walk(args.plugin, p, excludes=args.excludes, fs_encoding=args.fs_encoding)
################################################################################ from __future__ import print_function import os import sys import textwrap import warnings import eyed3 import eyed3.utils import eyed3.utils.console import eyed3.plugins import eyed3.info from eyed3.compat import ConfigParser, ConfigParserError, StringIO from eyed3.utils.log import initLogging initLogging() DEFAULT_PLUGIN = "classic" DEFAULT_CONFIG = eyed3.info.USER_CONFIG def main(args, config): if args.list_plugins: _listPlugins(config) return 0 args.plugin.start(args, config) # Process paths (files/directories) for p in args.paths: eyed3.utils.walk(args.plugin,