Use os.path.join() where possible
This commit is contained in:
parent
b9ca5c0c89
commit
015ba27c33
1 changed files with 2 additions and 2 deletions
|
@ -11,10 +11,10 @@ class Archive():
|
|||
self.bucket = bucket
|
||||
|
||||
def is_archived(self, key: str):
|
||||
return os.path.exists(self.path + '/' + key)
|
||||
return os.path.exists(os.path.join(self.path, key))
|
||||
|
||||
def archive(self, key: str):
|
||||
path = self.path + '/' + key
|
||||
path = os.path.join(self.path, key)
|
||||
parent = os.path.dirname(path)
|
||||
|
||||
os.makedirs(parent, exist_ok=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue