bridgedb.runner

Classes for running components and servers, as well as daemonisation.

** Module Overview: **

find(filename)[source]

Find the executable filename.

Parameters:filename (string) – The executable to search for. Must be in the effective user ID’s $PATH.
Return type:string :returns: The location of the executable, if found. Otherwise, returns
None.
generateDescriptors(count=None, rundir=None)[source]

Run a script which creates fake bridge descriptors for testing purposes.

This will run Leekspin to create bridge server descriptors, bridge extra-info descriptors, and networkstatus document.

Parameters:
  • count (integer) – Number of mocked bridges to generate descriptor for. (default: 3)
  • rundir (string or None) – If given, use this directory as the current working directory for the bridge descriptor generator script to run in. The directory MUST already exist, and the descriptor files will be created in it. If None, use the whatever directory we are currently in.
doDumpBridges(config)[source]

Dump bridges by assignment to a file.

This function handles the commandline ‘–dump-bridges’ option.

Parameters:config (bridgedb.Main.Conf) – The current configuration.