summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rwxr-xr-xproject.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/project.py b/project.py
index a7001b01..84e3684d 100755
--- a/project.py
+++ b/project.py
@@ -103,7 +103,7 @@ def _ProjectHooks():
103 if _project_hook_list is None: 103 if _project_hook_list is None:
104 d = platform_utils.realpath(os.path.abspath(os.path.dirname(__file__))) 104 d = platform_utils.realpath(os.path.abspath(os.path.dirname(__file__)))
105 d = os.path.join(d, 'hooks') 105 d = os.path.join(d, 'hooks')
106 _project_hook_list = [os.path.join(d, x) for x in os.listdir(d)] 106 _project_hook_list = [os.path.join(d, x) for x in platform_utils.listdir(d)]
107 return _project_hook_list 107 return _project_hook_list
108 108
109 109
@@ -253,7 +253,7 @@ class _CopyFile(object):
253 platform_utils.remove(dest) 253 platform_utils.remove(dest)
254 else: 254 else:
255 dest_dir = os.path.dirname(dest) 255 dest_dir = os.path.dirname(dest)
256 if not os.path.isdir(dest_dir): 256 if not platform_utils.isdir(dest_dir):
257 os.makedirs(dest_dir) 257 os.makedirs(dest_dir)
258 shutil.copy(src, dest) 258 shutil.copy(src, dest)
259 # make the file read-only 259 # make the file read-only
@@ -282,7 +282,7 @@ class _LinkFile(object):
282 platform_utils.remove(absDest) 282 platform_utils.remove(absDest)
283 else: 283 else:
284 dest_dir = os.path.dirname(absDest) 284 dest_dir = os.path.dirname(absDest)
285 if not os.path.isdir(dest_dir): 285 if not platform_utils.isdir(dest_dir):
286 os.makedirs(dest_dir) 286 os.makedirs(dest_dir)
287 platform_utils.symlink(relSrc, absDest) 287 platform_utils.symlink(relSrc, absDest)
288 except IOError: 288 except IOError:
@@ -302,7 +302,7 @@ class _LinkFile(object):
302 else: 302 else:
303 # Entity doesn't exist assume there is a wild card 303 # Entity doesn't exist assume there is a wild card
304 absDestDir = self.abs_dest 304 absDestDir = self.abs_dest
305 if os.path.exists(absDestDir) and not os.path.isdir(absDestDir): 305 if os.path.exists(absDestDir) and not platform_utils.isdir(absDestDir):
306 _error('Link error: src with wildcard, %s must be a directory', 306 _error('Link error: src with wildcard, %s must be a directory',
307 absDestDir) 307 absDestDir)
308 else: 308 else:
@@ -750,7 +750,7 @@ class Project(object):
750 750
751 @property 751 @property
752 def Exists(self): 752 def Exists(self):
753 return os.path.isdir(self.gitdir) and os.path.isdir(self.objdir) 753 return platform_utils.isdir(self.gitdir) and platform_utils.isdir(self.objdir)
754 754
755 @property 755 @property
756 def CurrentBranch(self): 756 def CurrentBranch(self):
@@ -931,7 +931,7 @@ class Project(object):
931 quiet: If True then only print the project name. Do not print 931 quiet: If True then only print the project name. Do not print
932 the modified files, branch name, etc. 932 the modified files, branch name, etc.
933 """ 933 """
934 if not os.path.isdir(self.worktree): 934 if not platform_utils.isdir(self.worktree):
935 if output_redir is None: 935 if output_redir is None:
936 output_redir = sys.stdout 936 output_redir = sys.stdout
937 print(file=output_redir) 937 print(file=output_redir)
@@ -2520,7 +2520,7 @@ class Project(object):
2520 2520
2521 to_copy = [] 2521 to_copy = []
2522 if copy_all: 2522 if copy_all:
2523 to_copy = os.listdir(gitdir) 2523 to_copy = platform_utils.listdir(gitdir)
2524 2524
2525 dotgit = platform_utils.realpath(dotgit) 2525 dotgit = platform_utils.realpath(dotgit)
2526 for name in set(to_copy).union(to_symlink): 2526 for name in set(to_copy).union(to_symlink):
@@ -2539,7 +2539,7 @@ class Project(object):
2539 platform_utils.symlink( 2539 platform_utils.symlink(
2540 os.path.relpath(src, os.path.dirname(dst)), dst) 2540 os.path.relpath(src, os.path.dirname(dst)), dst)
2541 elif copy_all and not platform_utils.islink(dst): 2541 elif copy_all and not platform_utils.islink(dst):
2542 if os.path.isdir(src): 2542 if platform_utils.isdir(src):
2543 shutil.copytree(src, dst) 2543 shutil.copytree(src, dst)
2544 elif os.path.isfile(src): 2544 elif os.path.isfile(src):
2545 shutil.copy(src, dst) 2545 shutil.copy(src, dst)