67
68if __name__ != "__main__":
69▶ raise ImportError("{} should not be used as a module.".format(__name__))
70
71import argparse
· · ·
313 try:
314 cwd = os.path.dirname(os.path.realpath(__file__))
315▶ return Git(cwd=cwd, errors=False).describe().lstrip("v")
316 except Git.Error:
317 return "-".join((version, "unknown"))
· · ·
316▶ except Git.Error:
317 return "-".join((version, "unknown"))
318
· · ·
407
408class Git:
409▶ def __init__(self, workdir=None, gitdir=None, cwd=None, errors=True):
410 self.gitcmd = ["git"]
411 self.errors = errors
· · ·
411▶ self.errors = errors
412 self._proc = None
413 if workdir:
+ 20 more matches in this file