diff options
Diffstat (limited to 'libmproxy/contentviews.py')
-rw-r--r-- | libmproxy/contentviews.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libmproxy/contentviews.py b/libmproxy/contentviews.py index 9af08033..8d5aadfc 100644 --- a/libmproxy/contentviews.py +++ b/libmproxy/contentviews.py @@ -515,6 +515,14 @@ def get_by_shortcut(c): return i +def add(obj): + for i in views: + if i.name == obj.name: + raise ContentViewException("Duplicate view: " + obj.name) + + views.append(obj) + + def get(name): for i in views: if i.name == name: |