| 364 | ############################## Version Config ################################## |
| 365 | |
| 366 | def get_system_user(): |
| 367 | SYSTEM_USER = getpass.getuser() or os.getlogin() |
| 368 | try: |
| 369 | import pwd |
| 370 | return pwd.getpwuid(os.geteuid()).pw_name or SYSTEM_USER |
| 371 | except KeyError: |
| 372 | # Process' UID might not map to a user in cases such as running the Docker image |
| 373 | # (where `archivebox` is 999) as a different UID. |
| 374 | pass |
| 375 | except ModuleNotFoundError: |
| 376 | # pwd doesn't exist on windows |
| 377 | pass |
| 378 | except Exception: |
| 379 | # this should never happen, uncomment to debug |
| 380 | # raise |
| 381 | pass |
| 382 | |
| 383 | return SYSTEM_USER |
| 384 | |
| 385 | def get_version(config): |
| 386 | try: |