diff --git a/ExtensionCrawler/cdnjs_git.py b/ExtensionCrawler/cdnjs_git.py index 2642be4..382bcb3 100644 --- a/ExtensionCrawler/cdnjs_git.py +++ b/ExtensionCrawler/cdnjs_git.py @@ -60,8 +60,10 @@ def pull_get_list_changed_files(gitrepo): for single_fetch_info in fetch_info: for diff in single_fetch_info.commit.diff( single_fetch_info.old_commit): - if not diff.a_blob.path in files: - files.append(diff.a_blob.path) + logging.debug("Found diff: " + str(diff)) + if not diff.a_blob is None: + if not diff.a_blob.path in files: + files.append(diff.a_blob.path) return files def normalize_jsdata(str_data): @@ -221,6 +223,9 @@ def pull_get_updated_lib_files(cdnjs_git_path): libvers = set() files = [] cdnjs_repo = git.Repo(cdnjs_git_path) + logging.info(" HEAD: " + str(cdnjs_repo.head.commit)) + logging.info(" is detached: " + str(cdnjs_repo.head.is_detached)) + logging.info(" is dirty: " + str(cdnjs_repo.is_dirty())) for update in pull_get_list_changed_files(cdnjs_repo): if not (os.path.basename(update) in ["package.json", ".gitkeep"]): if update.startswith("ajax"):