mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 14:10:20 +00:00
Update config.py
This commit is contained in:
parent
c42fcd42d7
commit
cc8611de83
1 changed files with 3 additions and 3 deletions
|
@ -92,18 +92,18 @@ if not USE_COLOR:
|
||||||
ANSI = {k: '' for k in ANSI.keys()}
|
ANSI = {k: '' for k in ANSI.keys()}
|
||||||
|
|
||||||
### Confirm Environment Setup
|
### Confirm Environment Setup
|
||||||
|
GIT_SHA = 'unknown'
|
||||||
try:
|
try:
|
||||||
GIT_SHA = run(["git", "rev-list", "-1", "HEAD", "./"], stdout=PIPE, cwd=REPO_DIR).stdout.strip().decode()
|
GIT_SHA = run(["git", "rev-list", "-1", "HEAD", "./"], stdout=PIPE, cwd=REPO_DIR).stdout.strip().decode()
|
||||||
except Exception:
|
except Exception:
|
||||||
GIT_SHA = 'unknown'
|
print('[!] Warning: unable to determine git version, is git installed and in your $PATH?')
|
||||||
print('[!] Warning, you need git installed for code version to be saved with archive json!')
|
|
||||||
|
|
||||||
WGET_VERSION = 'unknown'
|
WGET_VERSION = 'unknown'
|
||||||
try:
|
try:
|
||||||
wget_vers_str = run(["wget", "--version"], stdout=PIPE, cwd=REPO_DIR).stdout.strip().decode()
|
wget_vers_str = run(["wget", "--version"], stdout=PIPE, cwd=REPO_DIR).stdout.strip().decode()
|
||||||
WGET_VERSION = wget_vers_str.split('\n')[0].split(' ')[2]
|
WGET_VERSION = wget_vers_str.split('\n')[0].split(' ')[2]
|
||||||
except Exception:
|
except Exception:
|
||||||
print('[!] Warning, unable to determine wget version, is wget installed and in your $PATH?')
|
print('[!] Warning: unable to determine wget version, is wget installed and in your $PATH?')
|
||||||
|
|
||||||
WGET_USER_AGENT = WGET_USER_AGENT.format(GIT_SHA=GIT_SHA[:9], WGET_VERSION=WGET_VERSION)
|
WGET_USER_AGENT = WGET_USER_AGENT.format(GIT_SHA=GIT_SHA[:9], WGET_VERSION=WGET_VERSION)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue