From c08d3873c361e926eb69645a18a2ba82e6e29015 Mon Sep 17 00:00:00 2001 From: graham.gower@gmail.com Date: Sun, 23 Oct 2011 19:42:50 -0400 Subject: Use a default Version and Architecture in the event that none is specified. git-svn-id: http://opkg.googlecode.com/svn/trunk@632 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'tests/regress/opk.py') diff --git a/tests/regress/opk.py b/tests/regress/opk.py index 9763bd3..ebfb6ec 100644 --- a/tests/regress/opk.py +++ b/tests/regress/opk.py @@ -14,6 +14,13 @@ class Opk: if k not in self.valid_control_fields: raise Exception("Invalid control field: " "{}".format(k)) + if "Package" not in control.keys(): + print("Cannot create opk without Package name.\n") + return None + if "Architecture" not in control.keys(): + control["Architecture"] = "all" + if "Version" not in control.keys(): + control["Version"] = "1.0" self.control = control def write(self, tar_not_ar=False, data_files=None): -- cgit v0.9.1