summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2010-08-30 14:34:25 +0200
committerMartin Sivak <msivak@redhat.com>2010-08-30 14:37:55 +0200
commit356290dea5be39ce0921a75871eef9c7e772f7ff (patch)
treed2346d0bb2d45334e8cebfd23056275ba51d47c3
parent4c968e83624b037837636f6a0064874a3dbeb0b3 (diff)
downloadfirstaidkit-356290dea5be39ce0921a75871eef9c7e772f7ff.tar.gz
firstaidkit-356290dea5be39ce0921a75871eef9c7e772f7ff.tar.xz
firstaidkit-356290dea5be39ce0921a75871eef9c7e772f7ff.zip
When initializin flows, make it possible to initialize empty flow dict
-rw-r--r--pyfirstaidkit/plugins.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py
index c0f1361..5b95dfa 100644
--- a/pyfirstaidkit/plugins.py
+++ b/pyfirstaidkit/plugins.py
@@ -40,8 +40,11 @@ class Flow(dict):
dict.__init__(self, rules, *args, **kwargs)
@staticmethod
- def init(parent):
- flows = deepcopy(parent.flows)
+ def init(parent = None):
+ if parent:
+ flows = deepcopy(parent.flows)
+ else:
+ flows = dict()
return flows
class Plugin(object):