Bug fix: only try to preserve outphased library information is there is any stored locally.
This commit is contained in:
parent
80c8e7caa0
commit
0f716e98da
|
@ -121,12 +121,15 @@ def update_lib(verbose, force, archive, lib):
|
||||||
|
|
||||||
lib_ver['files'] = files_with_hashes
|
lib_ver['files'] = files_with_hashes
|
||||||
|
|
||||||
|
if local_lib_json is not None:
|
||||||
outphased = []
|
outphased = []
|
||||||
for lib_ver in local_lib_json['assets']:
|
for lib_ver in local_lib_json['assets']:
|
||||||
version = lib_ver['version']
|
version = lib_ver['version']
|
||||||
if not version in cdnjs_versions:
|
if not version in cdnjs_versions:
|
||||||
logging.warning("Found outphased versions for " + name + " " + str(
|
logging.warning("Found outphased versions for " + name + " " + str(
|
||||||
version) + " , preserving from archive.")
|
version) + " , preserving from archive.")
|
||||||
|
if not 'outphased' in lib_ver:
|
||||||
|
lib_ver['outphased'] = datetime.datetime.utcnow().isoformat()
|
||||||
outphased.append(lib_ver)
|
outphased.append(lib_ver)
|
||||||
if outphased:
|
if outphased:
|
||||||
cdnjs_lib_json['assets'] = cdnjs_lib_json['assets'] + outphased
|
cdnjs_lib_json['assets'] = cdnjs_lib_json['assets'] + outphased
|
||||||
|
|
Loading…
Reference in New Issue