summaryrefslogtreecommitdiffstats
path: root/tests/regress/opk.py
diff options
context:
space:
mode:
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-10-23 19:42:50 (EDT)
committer graham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-10-23 19:42:50 (EDT)
commitc08d3873c361e926eb69645a18a2ba82e6e29015 (patch)
tree644f00ecead2d25606fe793adb5ccbc14715c823 /tests/regress/opk.py
parentc0c5f116ac39a3bc0cbec6ca55c0359062ad0d8f (diff)
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
Diffstat (limited to 'tests/regress/opk.py')
-rw-r--r--tests/regress/opk.py7
1 files changed, 7 insertions, 0 deletions
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):