From c559ffdeab30f0d2196e77798493af75bf1f20ff Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 13 Jul 2016 00:01:58 +0200 Subject: [PATCH] VMCollection reword vm already exists exception --- qubes/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubes/app.py b/qubes/app.py index caa96b93..a0b49634 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -387,7 +387,6 @@ class VMCollection(object): __iter__ = vms values = vms - def add(self, value, _enable_events=True): '''Add VM to collection @@ -406,8 +405,9 @@ class VMCollection(object): raise ValueError('This collection already holds VM that has ' 'qid={!r} ({!r})'.format(value.qid, self[value.qid])) if value.name in self: - raise ValueError('This collection already holds VM that has ' - 'name={!r} ({!r})'.format(value.name, self[value.name])) + + raise ValueError('A VM named {!s} already exists' + .format(value.name)) self._dict[value.qid] = value if _enable_events: