Skip to content

Commit

Permalink
Increased resolution of backup name
Browse files Browse the repository at this point in the history
Needed to avoid overwriting if run multiple times on same day.
  • Loading branch information
rgonzalezfluendo committed Nov 16, 2024
1 parent 7c750d8 commit 3276f08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guw/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
import sys
import tempfile
from datetime import date
from datetime import datetime
from functools import cache

import colorlog
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(self, config):
self.to_push = []

def _backup_name(self, name):
today = str(date.today())
today = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
backup_name = f"{name}-{today}"
return backup_name

Expand Down

0 comments on commit 3276f08

Please sign in to comment.