hgext/git/gitutil.py
changeset 49849 de9ffb82ef4d
parent 49300 227124098e14
child 51859 f4733654f144
equal deleted inserted replaced
49848:139f713010ea 49849:de9ffb82ef4d
     7 
     7 
     8 def get_pygit2():
     8 def get_pygit2():
     9     global pygit2_module
     9     global pygit2_module
    10     if pygit2_module is None:
    10     if pygit2_module is None:
    11         try:
    11         try:
    12             import pygit2 as pygit2_module
    12             import pygit2 as pygit2_module  # pytype: disable=import-error
    13 
    13 
    14             pygit2_module.InvalidSpecError
    14             pygit2_module.InvalidSpecError
    15         except (ImportError, AttributeError):
    15         except (ImportError, AttributeError):
    16             pass
    16             pass
    17     return pygit2_module
    17     return pygit2_module