From 2f6ab7f5b8f21b2dbfe9ae102674bd1694e94f03 Mon Sep 17 00:00:00 2001 From: Mickaël Salaün Date: Sun, 30 Sep 2012 00:37:55 +0200 Subject: 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 --- subcmds/sync.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'subcmds') 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 print >>sys.stderr, 'Deleting obsolete path %s' % project.worktree shutil.rmtree(project.worktree) # Try deleting parent subdirs if they are empty - dir = os.path.dirname(project.worktree) - while dir != self.manifest.topdir: + project_dir = os.path.dirname(project.worktree) + while project_dir != self.manifest.topdir: try: - os.rmdir(dir) + os.rmdir(project_dir) except OSError: break - dir = os.path.dirname(dir) + project_dir = os.path.dirname(project_dir) new_project_paths.sort() fd = open(file_path, 'w') -- cgit v1.2.3-54-g00ecf