File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ def git_get_keywords(versionfile_abs):
167
167
@register_vcs_handler ("git" , "keywords" )
168
168
def git_versions_from_keywords (keywords , tag_prefix , verbose ):
169
169
"""Get version information from git keywords."""
170
- if not keywords :
171
- raise NotThisMethod ("no keywords at all, weird " )
170
+ if "refnames" not in keywords :
171
+ raise NotThisMethod ("Short version file found " )
172
172
date = keywords .get ("date" )
173
173
if date is not None :
174
174
# git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
Original file line number Diff line number Diff line change @@ -588,8 +588,8 @@ def git_get_keywords(versionfile_abs):
588
588
@register_vcs_handler("git", "keywords")
589
589
def git_versions_from_keywords(keywords, tag_prefix, verbose):
590
590
"""Get version information from git keywords."""
591
- if not keywords:
592
- raise NotThisMethod("no keywords at all, weird ")
591
+ if "refnames" not in keywords:
592
+ raise NotThisMethod("Short version file found ")
593
593
date = keywords.get("date")
594
594
if date is not None:
595
595
# git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant
@@ -985,8 +985,8 @@ def git_get_keywords(versionfile_abs):
985
985
@register_vcs_handler ("git" , "keywords" )
986
986
def git_versions_from_keywords (keywords , tag_prefix , verbose ):
987
987
"""Get version information from git keywords."""
988
- if not keywords :
989
- raise NotThisMethod ("no keywords at all, weird " )
988
+ if "refnames" not in keywords :
989
+ raise NotThisMethod ("Short version file found " )
990
990
date = keywords .get ("date" )
991
991
if date is not None :
992
992
# git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
You can’t perform that action at this time.
0 commit comments