The zaqar.version module

verify_sha(expected)

Verifies the commit hash for an interim Zaqar build.

This function may be used to verify that the version of the zaqar package, as imported from an environment’s site-packages, is the expected build. This allows continuous integration scripts to detect out-of-date installations of the package.

Note that this function will ALWAYS return False for Zaqar packages that were not installed from git.

Parameters:expected – The expected commit object name. May be either a full or abbreviated SHA hash. If abbreviated, at least 7 digits are required.
Returns:True if the package’s version string contains a hash, and that hash matches expected. Otherwise returns False.

Previous topic

The zaqar.transport.wsgi.version module

Project Source

This Page