diff options
author | Mickaël Salaün <mic@digikod.net> | 2012-09-30 00:37:55 +0200 |
---|---|---|
committer | Mickaël Salaün <mic@digikod.net> | 2012-10-10 08:30:15 +0200 |
commit | 2f6ab7f5b8f21b2dbfe9ae102674bd1694e94f03 (patch) | |
tree | 040f9045751d83902ea8c479304fdfa2a0061a54 /subcmds | |
parent | 3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63 (diff) | |
download | git-repo-2f6ab7f5b8f21b2dbfe9ae102674bd1694e94f03.tar.gz |
Rename "dir" variables
The variable name "dir" conflicts with the name of a Python built-in
function: http://docs.python.org/library/functions.html#dir
Change-Id: I850f3ec8df7563dc85e21f2876fe5e6550ca2d8f
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/sync.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 1b716351..e68a025e 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -339,13 +339,13 @@ uncommitted changes are present' % project.relpath | |||
339 | print >>sys.stderr, 'Deleting obsolete path %s' % project.worktree | 339 | print >>sys.stderr, 'Deleting obsolete path %s' % project.worktree |
340 | shutil.rmtree(project.worktree) | 340 | shutil.rmtree(project.worktree) |
341 | # Try deleting parent subdirs if they are empty | 341 | # Try deleting parent subdirs if they are empty |
342 | dir = os.path.dirname(project.worktree) | 342 | project_dir = os.path.dirname(project.worktree) |
343 | while dir != self.manifest.topdir: | 343 | while project_dir != self.manifest.topdir: |
344 | try: | 344 | try: |
345 | os.rmdir(dir) | 345 | os.rmdir(project_dir) |
346 | except OSError: | 346 | except OSError: |
347 | break | 347 | break |
348 | dir = os.path.dirname(dir) | 348 | project_dir = os.path.dirname(project_dir) |
349 | 349 | ||
350 | new_project_paths.sort() | 350 | new_project_paths.sort() |
351 | fd = open(file_path, 'w') | 351 | fd = open(file_path, 'w') |