summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/statemachine/libraryBookDemo.py2
-rw-r--r--examples/statemachine/statemachine.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/statemachine/libraryBookDemo.py b/examples/statemachine/libraryBookDemo.py
index 61bdd6d..6dbdb46 100644
--- a/examples/statemachine/libraryBookDemo.py
+++ b/examples/statemachine/libraryBookDemo.py
@@ -45,7 +45,7 @@ def run_demo():
print(book)
try:
book.checkout()
- except Exception as e: # statemachine.InvalidTransitionException:
+ except librarybookstate.BookState.InvalidTransitionException as e:
print(e)
print("..cannot check out reserved book")
book.release()
diff --git a/examples/statemachine/statemachine.py b/examples/statemachine/statemachine.py
index a5f144e..befa68e 100644
--- a/examples/statemachine/statemachine.py
+++ b/examples/statemachine/statemachine.py
@@ -8,6 +8,7 @@ import sys
import os
import types
import importlib
+import importlib.machinery
from urllib.parse import urlparse