summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-04 20:14:58 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-04 20:14:58 +0100
commit592467c7bdf3df32621057a500bd4436648fe1b7 (patch)
tree72b37af20d2dd84e7ab89d02974bfa191bb2cb6a
parent1599140196d14e7c15af615ae8831deca4d3d64b (diff)
ethumb test: more correct global usage
-rwxr-xr-xexamples/ethumb/ethumb.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/ethumb/ethumb.py b/examples/ethumb/ethumb.py
index ff71431..88344d9 100755
--- a/examples/ethumb/ethumb.py
+++ b/examples/ethumb/ethumb.py
@@ -64,6 +64,8 @@ start_time = 0.0
64 64
65 65
66def generate_cb(et, success): 66def generate_cb(et, success):
67 global in_progress
68
67 # thumbnail completed 69 # thumbnail completed
68 if success is True: 70 if success is True:
69 # print out the result 71 # print out the result
@@ -76,6 +78,9 @@ def generate_cb(et, success):
76 78
77 79
78def start_thumb(label, params): 80def start_thumb(label, params):
81 global in_progress
82 global start_time
83
79 # setup ethumb params 84 # setup ethumb params
80 et.file = filename 85 et.file = filename
81 for name, val in params.items(): 86 for name, val in params.items():
@@ -83,7 +88,6 @@ def start_thumb(label, params):
83 88
84 # print test name and keep track of start time 89 # print test name and keep track of start time
85 print(label) 90 print(label)
86 global start_time
87 start_time = time.time() 91 start_time = time.time()
88 92
89 # start the thumbnailing process 93 # start the thumbnailing process