mirror of
https://github.com/docker/compose.git
synced 2025-07-16 18:24:26 +02:00
Reduce path manipulation
If we're using self.filename, then it's already a full path and we don't need to splice off the filename.yml just so we can .join it back together again. Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
parent
6e4a954dbd
commit
5e2d43843c
@ -163,12 +163,12 @@ class ServiceLoader(object):
|
|||||||
if self.working_dir is None:
|
if self.working_dir is None:
|
||||||
raise Exception("No working_dir passed to ServiceLoader()")
|
raise Exception("No working_dir passed to ServiceLoader()")
|
||||||
|
|
||||||
try:
|
if 'file' in extends_options:
|
||||||
extends_from_filename = extends_options['file']
|
extends_from_filename = extends_options['file']
|
||||||
except KeyError:
|
|
||||||
extends_from_filename = os.path.split(self.filename)[1]
|
|
||||||
|
|
||||||
other_config_path = expand_path(self.working_dir, extends_from_filename)
|
other_config_path = expand_path(self.working_dir, extends_from_filename)
|
||||||
|
else:
|
||||||
|
other_config_path = self.filename
|
||||||
|
|
||||||
other_working_dir = os.path.dirname(other_config_path)
|
other_working_dir = os.path.dirname(other_config_path)
|
||||||
other_already_seen = self.already_seen + [self.signature(service_dict['name'])]
|
other_already_seen = self.already_seen + [self.signature(service_dict['name'])]
|
||||||
other_loader = ServiceLoader(
|
other_loader = ServiceLoader(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user