Commit bc2caa61 authored by Daniele Venzano's avatar Daniele Venzano
Browse files

Add check on application description version during validation in the master

parent 6d9b5f9d
......@@ -14,6 +14,7 @@
# limitations under the License.
from zoe_lib.exceptions import InvalidApplicationDescription
import zoe_lib.version
class ApplicationDescription:
......@@ -48,6 +49,8 @@ class ApplicationDescription:
self.version = int(data['version'])
if self.version != zoe_lib.version.ZOE_APPLICATION_FORMAT_VERSION:
raise InvalidApplicationDescription(msg="This version of Zoe supports only version {} for application descriptions".format(zoe_lib.version.ZOE_APPLICATION_FORMAT_VERSION))
except ValueError:
raise InvalidApplicationDescription(msg="version field should be an int")
except KeyError:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment