summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
authorRaman Tenneti <rtenneti@google.com>2021-11-17 18:38:24 -0800
committerRaman Tenneti <rtenneti@google.com>2021-11-18 16:22:40 +0000
commit4a478edb443864561089b2699c9e65c85fc5e036 (patch)
treee816a38fb6a6a1275558163940923a4e9acd859e /subcmds/init.py
parent6bd89aa6579cb5a108554c392d7d87a6ce978aa8 (diff)
downloadgit-repo-4a478edb443864561089b2699c9e65c85fc5e036.tar.gz
init, sync: fixed flake8 warnings.v2.18
Tested: + run_tests + flake8 subcmds/init.py + flake8 subcmds/sync.py Change-Id: Ie337481d8a210bfc49b0745f75c05a308a0e74d3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/324155 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Raman Tenneti <rtenneti@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 1fbe4654..e2f34cc8 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -15,7 +15,6 @@
15import os 15import os
16import platform 16import platform
17import re 17import re
18import subprocess
19import sys 18import sys
20import urllib.parse 19import urllib.parse
21 20
@@ -132,8 +131,8 @@ to update the working directory files.
132 'cannot be re-initialized without --manifest-url/-u') 131 'cannot be re-initialized without --manifest-url/-u')
133 sys.exit(1) 132 sys.exit(1)
134 133
135 if opt.standalone_manifest or ( 134 if opt.standalone_manifest or (was_standalone_manifest and
136 was_standalone_manifest and opt.manifest_url): 135 opt.manifest_url):
137 m.config.ClearCache() 136 m.config.ClearCache()
138 if m.gitdir and os.path.exists(m.gitdir): 137 if m.gitdir and os.path.exists(m.gitdir):
139 platform_utils.rmtree(m.gitdir) 138 platform_utils.rmtree(m.gitdir)
@@ -486,8 +485,8 @@ to update the working directory files.
486 self.OptionParser.error('--mirror and --use-superproject cannot be ' 485 self.OptionParser.error('--mirror and --use-superproject cannot be '
487 'used together.') 486 'used together.')
488 487
489 if opt.standalone_manifest and ( 488 if opt.standalone_manifest and (opt.manifest_branch or
490 opt.manifest_branch or opt.manifest_name != 'default.xml'): 489 opt.manifest_name != 'default.xml'):
491 self.OptionParser.error('--manifest-branch and --manifest-name cannot' 490 self.OptionParser.error('--manifest-branch and --manifest-name cannot'
492 ' be used with --standalone-manifest.') 491 ' be used with --standalone-manifest.')
493 492