def GlobalOptions(): """ Instantiate a Configuration of global options that apply to shastity regardless of which command is running. """ return _config([ config.IntOption('verbosity', 'v', verbosity.to_verbosity(logging.DEBUG)), config.IntOption('block-size', None, DEFAULT_BLOCK_SIZE, short_help='The size in bytes of storage blocks.') ])
def GlobalOptions(): """ Instantiate a Configuration of global options that apply to shastity regardless of which command is running. """ return _config([ config.VerboseOption('verbosity', 'v', verbosity.to_verbosity(logging.DEBUG)), config.IntOption('block-size', None, DEFAULT_BLOCK_SIZE, short_help='The size in bytes of storage blocks.'), config.StringOption('config', 'c', '~/.shastity', short_help='Config file.'), ] )
def tstlvl(lvl): self.assertEqual(lvl, verbosity.to_level(verbosity.to_verbosity(lvl)))
def l(name): return verbosity.to_verbosity(getattr(logging, name))