mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 00:14:46 +00:00
parent
eb327cafb1
commit
ea1c29ca2e
1 changed files with 4 additions and 0 deletions
|
|
@ -109,6 +109,10 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
|
|
||||||
def _install_hg_hook(path):
|
def _install_hg_hook(path):
|
||||||
|
if not os.path.isfile(path):
|
||||||
|
# Make the file so we can avoid IOError's
|
||||||
|
open(path, 'w+').close()
|
||||||
|
|
||||||
c = ConfigParser()
|
c = ConfigParser()
|
||||||
c.readfp(open(path, 'r'))
|
c.readfp(open(path, 'r'))
|
||||||
if not c.has_section('hooks'):
|
if not c.has_section('hooks'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue