Utils Module

Utiilties and Exceptions for py2TheFaceR

class py2facer.lib.utils.Incrementer(option_strings, dest, incr_by, default, nargs=None, const=None, type=None, choices=None, required=False, help=None, metavar=None)

Monkeypatching the Incrementer so it can support and arbitrary increment by. All other arguments are as in argparse.Action with the exception of

Parameters:incr_by (int) – The amount to increment by
exception py2facer.lib.utils.InvalidConfig

Invalid config options either from the ini file or the CLI

exception py2facer.lib.utils.InvalidState

Raised when the program gets into some kind of invalid state

Examples: an invalid type, bad responses from flickr, corrupted files, etc.

class py2facer.lib.utils.LogClassFilter(name, invert=False)

Pass/Filter all records at logger name “name”

Parameters:
  • name (str) – Name of the Logger to filter for. Name must be a full path.
  • invert (Boolean) – If true, allow only that Logger and it’s children to pass. (default: False)
filter(record)

Filters logger records based on the current internal state

Parameters:record (LogRecord) – Logging record to filter
exception py2facer.lib.utils.ParseError

Raised when an error in parsing Picasa data is encountered.

Project Versions

Previous topic

<no title>

This Page