From 47120adeb5f8f6312780e2e8181c5c77c9ba9169 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 9 Oct 2021 18:19:58 +0200 Subject: [PATCH] temporary --- repository.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/repository.py b/repository.py index 20c11f8..315dd3d 100644 --- a/repository.py +++ b/repository.py @@ -9,9 +9,6 @@ class Repository: def __init__(self, args): self.directory = args[arguments.DIRECTORY] self.temporary = args[arguments.TEMPORARY] - self.tmp = os.path.join(self.temporary, - datetime.datetime.now() - .strftime('%Y%m%d%H%M%S')) self.load() def load(self): @@ -29,6 +26,11 @@ class Repository: d[architecture] = archive self.archives = d + def get_temporary(): + return os.path.join(self.temporary, + datetime.datetime.now() + .strftime('%Y%m%d%H%M%S')) + def __str__(self): lines = [ f'Directory: {self.directory}', @@ -37,5 +39,4 @@ class Repository: ] for architecture, archive in reversed(sorted(self.archives.items())): lines.append(f'{architecture} → {archive}') - lines.append(f'Temporary: {self.tmp}') return os.linesep.join(lines)