mirror of
https://github.com/ARM-software/devlib.git
synced 2025-03-04 09:17:51 +00:00
target: Align Target.tempfile() with Target.make_temp()
Align the parameters between the 2 methods: * Use "None" as default value * Do not add suffix or prefix if not asked for. * Separate components with "-" instead of "_"
This commit is contained in:
parent
3e1c928db3
commit
1da260b897
@ -1334,8 +1334,10 @@ fi
|
|||||||
return self.path.join(self.working_directory, name)
|
return self.path.join(self.working_directory, name)
|
||||||
|
|
||||||
@asyn.asyncf
|
@asyn.asyncf
|
||||||
async def tempfile(self, prefix='', suffix=''):
|
async def tempfile(self, prefix=None, suffix=None):
|
||||||
name = '{prefix}_{uuid}_{suffix}'.format(
|
prefix = f'{prefix}-' if prefix else ''
|
||||||
|
suffix = f'-{suffix}' if suffix else ''
|
||||||
|
name = '{prefix}{uuid}{suffix}'.format(
|
||||||
prefix=prefix,
|
prefix=prefix,
|
||||||
uuid=uuid.uuid4().hex,
|
uuid=uuid.uuid4().hex,
|
||||||
suffix=suffix,
|
suffix=suffix,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user