Skip to content

Commit f4cf67f

Browse files
committed
issue #615: remove meaningless test
It has been dead code since at least 2015
1 parent e02be89 commit f4cf67f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ansible_mitogen/plugins/action/mitogen_fetch.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,25 @@ def run(self, tmp=None, task_vars=None):
4545
task_vars = dict()
4646

4747
result = super(ActionModule, self).run(tmp, task_vars)
48-
del tmp # tmp no longer has any effect
49-
5048
try:
5149
if self._play_context.check_mode:
5250
result['skipped'] = True
5351
result['msg'] = 'check mode not (yet) supported for this module'
5452
return result
5553

56-
source = self._task.args.get('src', None)
57-
dest = self._task.args.get('dest', None)
5854
flat = boolean(self._task.args.get('flat'), strict=False)
5955
fail_on_missing = boolean(self._task.args.get('fail_on_missing', True), strict=False)
6056
validate_checksum = boolean(self._task.args.get('validate_checksum', True), strict=False)
6157

6258
# validate source and dest are strings FIXME: use basic.py and module specs
59+
source = self._task.args.get('src')
6360
if not isinstance(source, string_types):
6461
result['msg'] = "Invalid type supplied for source option, it must be a string"
6562

63+
dest = self._task.args.get('dest')
6664
if not isinstance(dest, string_types):
6765
result['msg'] = "Invalid type supplied for dest option, it must be a string"
6866

69-
if source is None or dest is None:
70-
result['msg'] = "src and dest are required"
71-
7267
if result.get('msg'):
7368
result['failed'] = True
7469
return result

0 commit comments

Comments
 (0)