This error arises when an exception occurs in this try block before the start = default_timer() line.
In such case the start variable is undefined. Unfortunately, the finally block tries to compute the duration using this variable.
Bug instroduced with cbf005b
related issue : #1478