mirror of
https://github.com/sartography/SpiffWorkflow.git
synced 2025-08-02 00:59:41 +08:00
futurize stage 1
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import
|
||||
from __future__ import print_function
|
||||
# Copyright (C) 2012 Matthew Hampton
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import
|
||||
from __future__ import print_function
|
||||
# Copyright (C) 2007 Samuel Abels
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import
|
||||
from __future__ import print_function
|
||||
# Copyright (C) 2007 Samuel Abels
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
@ -386,7 +387,7 @@ class TaskSpec(object):
|
||||
assert my_task is not None
|
||||
|
||||
if my_task.workflow.debug:
|
||||
print("Executing task:", my_task.get_name())
|
||||
print(("Executing task:", my_task.get_name()))
|
||||
|
||||
self._on_complete_hook(my_task)
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import
|
||||
from __future__ import print_function
|
||||
# Copyright (C) 2007 Samuel Abels
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import
|
||||
from __future__ import print_function
|
||||
# Copyright (C) 2007 Samuel Abels
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
@ -86,7 +87,7 @@ class Workflow(object):
|
||||
mask = Task.NOT_FINISHED_MASK
|
||||
iter = Task.Iterator(self.task_tree, mask)
|
||||
try:
|
||||
iter.next()
|
||||
next(iter)
|
||||
except:
|
||||
# No waiting tasks found.
|
||||
return True
|
||||
@ -223,7 +224,7 @@ class Workflow(object):
|
||||
if pick_up and self.last_task is not None:
|
||||
try:
|
||||
iter = Task.Iterator(self.last_task, Task.READY)
|
||||
next = iter.next()
|
||||
next = next(iter)
|
||||
except:
|
||||
next = None
|
||||
self.last_task = None
|
||||
|
@ -1,8 +1,9 @@
|
||||
from __future__ import print_function
|
||||
from SpiffWorkflow.specs import Simple
|
||||
|
||||
class NuclearStrike(Simple):
|
||||
def _on_complete_hook(self, my_task):
|
||||
print(self.my_variable, "sent!")
|
||||
print((self.my_variable, "sent!"))
|
||||
|
||||
def serialize(self, serializer):
|
||||
return serializer.serialize_nuclear_strike(self)
|
||||
|
@ -1,8 +1,9 @@
|
||||
from __future__ import print_function
|
||||
from SpiffWorkflow.specs import WorkflowSpec, ExclusiveChoice, Simple, Cancel
|
||||
from SpiffWorkflow.operators import Equal, Attrib
|
||||
|
||||
def my_nuclear_strike(msg):
|
||||
print "Launched:", msg
|
||||
print("Launched:", msg)
|
||||
|
||||
class NuclearStrikeWorkflowSpec(WorkflowSpec):
|
||||
def __init__(self):
|
||||
|
2
setup.py
2
setup.py
@ -20,7 +20,7 @@ included with the package.
|
||||
author_email = 'cheeseshop.python.org@debain.org',
|
||||
license = 'lGPLv2',
|
||||
packages = find_packages(exclude=['tests', 'tests.*']),
|
||||
install_requires = ['lxml'],
|
||||
install_requires = ['future', 'configparser', 'lxml'],
|
||||
keywords = 'spiff workflow bpmn engine',
|
||||
url = 'https://github.com/knipknap/SpiffWorkflow',
|
||||
classifiers = [
|
||||
|
Reference in New Issue
Block a user