changeset 25:b5cd8e22c868

use more defaults for default thing
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 09 May 2011 08:41:13 -0700
parents 61969be88632
children 85357b075211
files bzconsole/api.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bzconsole/api.py	Tue Jan 18 13:24:50 2011 -0800
+++ b/bzconsole/api.py	Mon May 09 08:41:13 2011 -0700
@@ -85,7 +85,11 @@
 
         # infer version if not given
         if version is None:
-            version = 'unspecified'
+            default_versions = ('unspecified', 'Trunk')
+            for ver in default_versions:
+                version = ver
+                if version in self._configuration['product'][product]['version']:
+                    break
         assert version in self._configuration['product'][product]['version'], 'Version not found'
 
         # get the bug description