Don't recreate existing presubmit venv.
Change-Id: If2a1aa52d67b8f1cd3dfe43fcf8a2d503c7575c8
diff --git a/presubmit.py b/presubmit.py
index ea5a0ff..3ad6a1c 100755
--- a/presubmit.py
+++ b/presubmit.py
@@ -33,7 +33,8 @@
def _init_virtualenv():
"""Set up virtualenv, assumes recent Python 3 is already installed."""
venv = os.path.abspath('.presubmit/venv')
- call('python', '-m', 'venv', venv)
+ if not os.path.isdir(venv):
+ call('python', '-m', 'venv', venv)
os.environ['PATH'] = os.pathsep.join((
os.path.join(venv, 'bin'),
os.environ['PATH'],