diff options
author | Andrej Rode <mail@andrejro.de> | 2016-02-12 14:31:25 +0100 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2016-02-12 14:31:25 +0100 |
commit | baab51695118fcdf7201c5f52cd2b12420f7328d (patch) | |
tree | 6743af2f83f59f771480cf7370e6cfd548ae3b17 | |
parent | e63f105c965989078188a22d737c10bfddd8e264 (diff) |
gr_modtool: add test on license_file for option --copyright. fix typo
-rw-r--r-- | gr-utils/python/modtool/modtool_add.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py index f04d9d90d9..3627dc6ad1 100644 --- a/gr-utils/python/modtool/modtool_add.py +++ b/gr-utils/python/modtool/modtool_add.py @@ -103,11 +103,13 @@ class ModToolAdd(ModTool): raise ModToolException('Invalid block name.') print "Block/code identifier: " + self._info['blockname'] self._info['fullblockname'] = self._info['modname'] + '_' + self._info['blockname'] - self._info['copyrightholder'] = options.copyright - if self._info['copyrightholder'] is None: - self._info['copyrightholder'] = '<+YOU OR YOUR COMPANY+>' - elif self._info['is_component']: - print "For GNUradio components the FSF is added as copyright holder" + if not options.license_file: + self._info['copyrightholder'] = options.copyright + if self._info['copyrightholder'] is None: + self._info['copyrightholder'] = '<+YOU OR YOUR COMPANY+>' + elif self._info['is_component']: + print "For GNU Radio components the FSF is added as copyright holder" + self._license_file = options.license_file self._info['license'] = self.setup_choose_license() if options.argument_list is not None: self._info['arglist'] = options.argument_list @@ -127,7 +129,6 @@ class ModToolAdd(ModTool): print "Warning: Autotools modules are not supported. ", print "Files will be created, but Makefiles will not be edited." self._skip_cmakefiles = True - self._license_file = options.license_file def setup_choose_license(self): """ Select a license by the following rules, in this order: |