Exemplo n.º 1
0
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.') ])
Exemplo n.º 2
0
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.'),
                     ]
                   )
Exemplo n.º 3
0
 def tstlvl(lvl):
     self.assertEqual(lvl,
                      verbosity.to_level(verbosity.to_verbosity(lvl)))
Exemplo n.º 4
0
 def l(name):
     return verbosity.to_verbosity(getattr(logging, name))
Exemplo n.º 5
0
 def tstlvl(lvl):
     self.assertEqual(lvl, verbosity.to_level(verbosity.to_verbosity(lvl)))
Exemplo n.º 6
0
 def l(name):
     return verbosity.to_verbosity(getattr(logging, name))