diff options
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/gitc_delete.py | 4 | ||||
-rw-r--r-- | subcmds/init.py | 4 | ||||
-rw-r--r-- | subcmds/sync.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py index 19caac5a..54f62f46 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py | |||
@@ -14,10 +14,10 @@ | |||
14 | # limitations under the License. | 14 | # limitations under the License. |
15 | 15 | ||
16 | from __future__ import print_function | 16 | from __future__ import print_function |
17 | import shutil | ||
18 | import sys | 17 | import sys |
19 | 18 | ||
20 | from command import Command, GitcClientCommand | 19 | from command import Command, GitcClientCommand |
20 | import platform_utils | ||
21 | 21 | ||
22 | from pyversion import is_python3 | 22 | from pyversion import is_python3 |
23 | if not is_python3(): | 23 | if not is_python3(): |
@@ -50,4 +50,4 @@ and all locally downloaded sources. | |||
50 | if not response == 'yes': | 50 | if not response == 'yes': |
51 | print('Response was not "yes"\n Exiting...') | 51 | print('Response was not "yes"\n Exiting...') |
52 | sys.exit(1) | 52 | sys.exit(1) |
53 | shutil.rmtree(self.gitc_manifest.gitc_client_dir) | 53 | platform_utils.rmtree(self.gitc_manifest.gitc_client_dir) |
diff --git a/subcmds/init.py b/subcmds/init.py index 65dfd1fd..e6470916 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -17,7 +17,6 @@ from __future__ import print_function | |||
17 | import os | 17 | import os |
18 | import platform | 18 | import platform |
19 | import re | 19 | import re |
20 | import shutil | ||
21 | import sys | 20 | import sys |
22 | 21 | ||
23 | from pyversion import is_python3 | 22 | from pyversion import is_python3 |
@@ -35,6 +34,7 @@ from error import ManifestParseError | |||
35 | from project import SyncBuffer | 34 | from project import SyncBuffer |
36 | from git_config import GitConfig | 35 | from git_config import GitConfig |
37 | from git_command import git_require, MIN_GIT_VERSION | 36 | from git_command import git_require, MIN_GIT_VERSION |
37 | import platform_utils | ||
38 | 38 | ||
39 | class Init(InteractiveCommand, MirrorSafeCommand): | 39 | class Init(InteractiveCommand, MirrorSafeCommand): |
40 | common = True | 40 | common = True |
@@ -252,7 +252,7 @@ to update the working directory files. | |||
252 | # Better delete the manifest git dir if we created it; otherwise next | 252 | # Better delete the manifest git dir if we created it; otherwise next |
253 | # time (when user fixes problems) we won't go through the "is_new" logic. | 253 | # time (when user fixes problems) we won't go through the "is_new" logic. |
254 | if is_new: | 254 | if is_new: |
255 | shutil.rmtree(m.gitdir) | 255 | platform_utils.rmtree(m.gitdir) |
256 | sys.exit(1) | 256 | sys.exit(1) |
257 | 257 | ||
258 | if opt.manifest_branch: | 258 | if opt.manifest_branch: |
diff --git a/subcmds/sync.py b/subcmds/sync.py index ef023274..797fc403 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -19,7 +19,6 @@ import netrc | |||
19 | from optparse import SUPPRESS_HELP | 19 | from optparse import SUPPRESS_HELP |
20 | import os | 20 | import os |
21 | import re | 21 | import re |
22 | import shutil | ||
23 | import socket | 22 | import socket |
24 | import subprocess | 23 | import subprocess |
25 | import sys | 24 | import sys |
@@ -73,6 +72,7 @@ from project import Project | |||
73 | from project import RemoteSpec | 72 | from project import RemoteSpec |
74 | from command import Command, MirrorSafeCommand | 73 | from command import Command, MirrorSafeCommand |
75 | from error import RepoChangedException, GitError, ManifestParseError | 74 | from error import RepoChangedException, GitError, ManifestParseError |
75 | import platform_utils | ||
76 | from project import SyncBuffer | 76 | from project import SyncBuffer |
77 | from progress import Progress | 77 | from progress import Progress |
78 | from wrapper import Wrapper | 78 | from wrapper import Wrapper |
@@ -473,7 +473,7 @@ later is required to fix a server side protocol bug. | |||
473 | # working git repository around. There shouldn't be any git projects here, | 473 | # working git repository around. There shouldn't be any git projects here, |
474 | # so rmtree works. | 474 | # so rmtree works. |
475 | try: | 475 | try: |
476 | shutil.rmtree(os.path.join(path, '.git')) | 476 | platform_utils.rmtree(os.path.join(path, '.git')) |
477 | except OSError: | 477 | except OSError: |
478 | print('Failed to remove %s' % os.path.join(path, '.git'), file=sys.stderr) | 478 | print('Failed to remove %s' % os.path.join(path, '.git'), file=sys.stderr) |
479 | print('error: Failed to delete obsolete path %s' % path, file=sys.stderr) | 479 | print('error: Failed to delete obsolete path %s' % path, file=sys.stderr) |