diff --git a/devlib/target.py b/devlib/target.py index fa9f92701..8b551882a 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -1315,8 +1315,10 @@ def get_workpath(self, name): return self.path.join(self.working_directory, name) @asyn.asyncf - async def tempfile(self, prefix='', suffix=''): - name = '{prefix}_{uuid}_{suffix}'.format( + async def tempfile(self, prefix=None, suffix=None): + prefix = f'{prefix}-' if prefix else '' + sufix = f'-{suffix}' if suffix else '' + name = '{prefix}{uuid}{suffix}'.format( prefix=prefix, uuid=uuid.uuid4().hex, suffix=suffix,