Skip to content

Commit

Permalink
Use async/await syntax instead of decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Feb 21, 2017
1 parent ba98445 commit f4380d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions skan/gui.py
Expand Up @@ -107,8 +107,7 @@ def choose_output_folder(self):
self.output_folder = \
tk.filedialog.askdirectory(initialdir=self.output_folder)

@asyncio.coroutine
def run(self):
async def run(self):
print('Input files:')
for file in self.input_files:
print(' ', file)
Expand All @@ -119,7 +118,7 @@ def run(self):
print('Output:', self.output_folder)
save_skeleton = ('' if not self.save_skeleton_plots.get() else
self.skeleton_plot_prefix.get())
result_full, result_image = yield from _async(pipe.process_images,
result_full, result_image = await _async(pipe.process_images,
self.input_files, self.image_format.get(),
self.threshold_radius.get(),
self.smooth_radius.get(),
Expand Down

0 comments on commit f4380d3

Please sign in to comment.