summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/init.py9
-rw-r--r--subcmds/sync.py8
2 files changed, 8 insertions, 9 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
diff --git a/subcmds/sync.py b/subcmds/sync.py
index ee7e4a80..4898430b 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -448,8 +448,8 @@ later is required to fix a server side protocol bug.
448 else: 448 else:
449 pm.update(inc=0, msg='warming up') 449 pm.update(inc=0, msg='warming up')
450 chunksize = 4 450 chunksize = 4
451 with multiprocessing.Pool( 451 with multiprocessing.Pool(jobs, initializer=self._FetchInitChild,
452 jobs, initializer=self._FetchInitChild, initargs=(ssh_proxy,)) as pool: 452 initargs=(ssh_proxy,)) as pool:
453 results = pool.imap_unordered( 453 results = pool.imap_unordered(
454 functools.partial(self._FetchProjectList, opt), 454 functools.partial(self._FetchProjectList, opt),
455 projects_list, 455 projects_list,
@@ -767,7 +767,7 @@ later is required to fix a server side protocol bug.
767 with open(copylinkfile_path, 'rb') as fp: 767 with open(copylinkfile_path, 'rb') as fp:
768 try: 768 try:
769 old_copylinkfile_paths = json.load(fp) 769 old_copylinkfile_paths = json.load(fp)
770 except: 770 except Exception:
771 print('error: %s is not a json formatted file.' % 771 print('error: %s is not a json formatted file.' %
772 copylinkfile_path, file=sys.stderr) 772 copylinkfile_path, file=sys.stderr)
773 platform_utils.remove(copylinkfile_path) 773 platform_utils.remove(copylinkfile_path)
@@ -1131,7 +1131,7 @@ def _PostRepoUpgrade(manifest, quiet=False):
1131 target = os.path.join('repo', 'docs', 'internal-fs-layout.md') 1131 target = os.path.join('repo', 'docs', 'internal-fs-layout.md')
1132 try: 1132 try:
1133 platform_utils.symlink(target, link) 1133 platform_utils.symlink(target, link)
1134 except: 1134 except Exception:
1135 pass 1135 pass
1136 1136
1137 wrapper = Wrapper() 1137 wrapper = Wrapper()