diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..94a601c --- /dev/null +++ b/flake.lock @@ -0,0 +1,23 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 0, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", + "path": "/nix/store/vqhkmj60457j8nrw9vb94ln40rkic1p6-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index e7c92d9..8a66fd1 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ pkgs.python3Packages.buildPythonApplication { inherit pname version; src = builtins.path { - path = ./.; + path = ./tuhmayto/.; name = "${pname}-${version}"; }; build-system = [ pkgs.python3Packages.setuptools ]; diff --git a/tuhmayto/tracker.py b/tuhmayto/tracker.py index 2061243..9cbe168 100644 --- a/tuhmayto/tracker.py +++ b/tuhmayto/tracker.py @@ -83,7 +83,7 @@ def scrape_and_log(url: str) -> None: print(f"A log already exists for {latest_log} or later. Skipping new log.") return - if last_seen_time.hour == latest_log.hour: + if latest_log and last_seen_time.hour == latest_log.hour: print(f"An entry for this hour already exists. Skipping new log.") return