diff --git a/script.py b/script.py index c4e27ce..64e1061 100644 --- a/script.py +++ b/script.py @@ -55,7 +55,7 @@ print("start running the log commands"); if not time_ago_arg: since_last_boot = run_command(["uptime","-s"]) slb_date = datetime.strptime(since_last_boot, "%Y-%m-%d %H:%M:%S") - time_since_last_boot = now - slb_date + time_since_last_boot = (now - slb_date).days device_info_grab = subprocess.run(["grep", 'Model' , "/proc/cpuinfo"], check=True, capture_output=True) device_info = run_command(['awk', '-F:', '{ print $2}'], based=device_info_grab.stdout) ip_address_show = subprocess.run(["ip", "addr", "show", "end0"], check=True, capture_output=True) @@ -107,7 +107,7 @@ output = template.render( list_package_upgrade=list_package_upgrade, list_package_remove=list_package_remove, device_info=device_info, - days_since_last_boot = time_since_last_boot.days, + days_since_last_boot = time_since_last_boot, kitchen_services = kitchen_services, ip_address = ip_address, logins_today = run_command(['grep', '-v', "Boot"], based=logins_today_log.stdout).splitlines(),