Bug 34017

Summary: genspec fails when only some optional arguments are provided
Product: Sisyphus Reporter: Andrew Savchenko <bircoph>
Component: genspecAssignee: obirvalger <obirvalger>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: cas, mike, obirvalger
Version: unstable   
Hardware: all   
OS: Linux   

Description Andrew Savchenko 2017-10-16 19:42:44 MSK
$ genspec
(without arguments) works

$ genspec -n name -t common -v 0.2 -s "summary" -l "GPL-2" -u "http://url" -d "nice test" -c "commit"
also works

$ genspec -t common
Traceback (most recent call last):
  File "/usr/bin/genspec", line 238, in <module>
    spec.deploy()
  File "/usr/bin/genspec", line 105, in deploy
    self.apply( self.keys['spec_type'] )
  File "/usr/bin/genspec", line 96, in apply
    + ' ' + self.keys['version']
TypeError: Can't convert 'NoneType' object to str implicitly
Comment 1 Repository Robot 2017-10-19 14:47:28 MSK
genspec-1.2.13-alt1 -> sisyphus:

Thu Oct 19 2017 Mikhail Gordeev <obirvalger@altlinux.org> 1.2.13-alt1
- (ALT #34017) Use deafult value for optional arguments