Default argparse argument (lock-timeout) gets stored as a string, which
is not compatible with SocketLock needing timeout to be an int. This
lead to the following type of error:
```
launchpadTrigger --lock-name=maint-ci-cloudware-image_naming-trigger
--job=maint-ci-cloudware-image_naming-test
'--branch=lp:~cloudware/cloudware/+git/image_naming' --trigger-ci
--repo_type=git --lock-timeout=60
DEBUG: Going to acquire launchpad lock
"launchpad-trigger-lock-maint-ci-cloudware-image_naming-trigger" for
launchpadTrigger
Traceback (most recent call last):
File "/usr/bin/launchpadTrigger", line 11, in <module> load_entry_point('jenkins-launchpad-plugin==19.1', 'console_scripts', 'launchpadTrigger')()
File
"/usr/lib/python3/dist-packages/jlp/commands/launchpadTrigger.py",
line 100, in launchpadTrigger
with SocketLock(trigger_lock_name, args['lock_timeout']):
File "/usr/lib/python3/dist-packages/jlp/socketlock.py",
line 64, in __enter__ self.acquire()
File "/usr/lib/python3/dist-packages/jlp/socketlock.py", line
39, in acquire
if timeout is not None and timeout > 0:
TypeError: '>' not supported between instances of 'str'
and 'int'
```
Fix is to cast it to int if a str is passed into SocketLock.acquire().
add --lock-timeout parameter to launchpadTrigger command
Currently there is no timeout so if something goes wrong with trying
to acquire a SocketLock, launchpadTrigger hands in an endless loop.
Having an option to provide a timeout can solve this.