mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
remove unnecessary os.path.basename logic
This commit is contained in:
parent
5d194f2d17
commit
bdec73bb03
1 changed files with 5 additions and 9 deletions
|
@ -289,14 +289,10 @@ def _process_requirements(requirements, cmd, cwd, saltenv, user):
|
|||
logger.info('request files: {0}'.format(str(reqs)))
|
||||
|
||||
for req_file in reqs:
|
||||
logger.debug('TREQ N CWD: %s -- %s -- for %s', str(treq), str(cwd), str(req_file))
|
||||
target_path = os.path.join(treq, os.path.basename(req_file))
|
||||
|
||||
req_filename = os.path.basename(req_file)
|
||||
|
||||
logger.debug('TREQ N CWD: %s -- %s -- for %s', str(treq), str(cwd), str(req_filename))
|
||||
source_path = os.path.join(cwd, req_filename)
|
||||
target_path = os.path.join(treq, req_filename)
|
||||
|
||||
logger.debug('S: %s', source_path)
|
||||
logger.debug('S: %s', req_file)
|
||||
logger.debug('T: %s', target_path)
|
||||
|
||||
target_base = os.path.dirname(target_path)
|
||||
|
@ -307,9 +303,9 @@ def _process_requirements(requirements, cmd, cwd, saltenv, user):
|
|||
|
||||
if not os.path.exists(target_path):
|
||||
logger.debug(
|
||||
'Copying %s to %s', source_path, target_path
|
||||
'Copying %s to %s', req_file, target_path
|
||||
)
|
||||
__salt__['file.copy'](source_path, target_path)
|
||||
__salt__['file.copy'](req_file, target_path)
|
||||
|
||||
logger.debug(
|
||||
'Changing ownership of requirements file \'{0}\' to '
|
||||
|
|
Loading…
Add table
Reference in a new issue