From e4bbbe0db20c6bfc0dc6bb3b2982db9f68db5f57 Mon Sep 17 00:00:00 2001 From: Christian Rebischke <chris@nullday.de> Date: Fri, 9 Aug 2019 22:58:00 +0200 Subject: [PATCH] measure date only once in the script Signed-off-by: Christian Rebischke <chris@nullday.de> --- controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller.py b/controller.py index a5624da..24cdee1 100644 --- a/controller.py +++ b/controller.py @@ -12,10 +12,11 @@ import subprocess import os.path API_URL = 'https://app.vagrantup.com/api/v1/box/archlinux/archlinux' -THIS_MONTH = int(datetime.datetime.now().strftime("%m")) +NOW = datetime.datetime.now() +THIS_MONTH = int(NOW.strftime("%m")) LEN_RELEASES = 2 CWD = '/srv/arch-boxes/arch-boxes' -ISO_PATH = '/srv/ftp/iso/latest/archlinux-' + datetime.datetime.now().strftime( +ISO_PATH = '/srv/ftp/iso/latest/archlinux-' + NOW.strftime( "%Y.%m") + '.01-x86_64.iso' ISO_CHECKSUM_PATH = '/srv/ftp/iso/latest/sha1sums.txt' PACKER_CMD_TEMPLATE = [ -- GitLab