Skip to content
Snippets Groups Projects

Move geometry devices, some utilities to own repositories

Merged David Hammer requested to merge move-utils-out into master
+ 0
22
from calng import utils
calls = 0
@utils.threadsafe_cache
def will_raise_once(argument):
global calls
calls += 1
if calls == 1:
raise Exception("That's just what I do")
return argument + 1
try:
will_raise_once(0)
except Exception as ex:
print("As expected, firs call raised:", ex)
print("Now calling again:")
print(will_raise_once(0))
Loading