summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorGökçen Nurlu <gnurlu1@bloomberg.net>2017-12-06 14:22:12 +0000
committerJürg Billeter <j@bitron.ch>2017-12-11 12:12:11 +0100
commita20dd5b97bfb1a82ba34523469461a9524a8316f (patch)
treeeca0d32e1d0fc614674149c4cf9a2354ea1eb135 /buildstream
parentf960ad156dadcd5fade1bf5e5595d54ae97a9cab (diff)
downloadbuildstream-a20dd5b97bfb1a82ba34523469461a9524a8316f.tar.gz
plugins/sources/bzr.py: Fix variable name typos
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/plugins/sources/bzr.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/buildstream/plugins/sources/bzr.py b/buildstream/plugins/sources/bzr.py
index 679a3436c..cb7cbb040 100644
--- a/buildstream/plugins/sources/bzr.py
+++ b/buildstream/plugins/sources/bzr.py
@@ -172,14 +172,15 @@ class BzrSource(Source):
repo in an inconsistent state.
"""
with self.tempdir() as repodir:
- if os.path.exists(self._get_mirror_dir()):
+ mirror_dir = self._get_mirror_dir()
+ if os.path.exists(mirror_dir):
try:
# shutil.copytree doesn't like it if destination exists
shutil.rmtree(repodir)
- shutil.copytree(self._get_mirror_dir(), repodir)
+ shutil.copytree(mirror_dir, repodir)
except (shutil.Error, OSError) as e:
raise SourceError("{}: Failed to copy bzr repo from '{}' to '{}'"
- .format(str(self), self.mirror_dir, tmpdir)) from e
+ .format(str(self), mirror_dir, repodir)) from e
yield repodir
self._atomic_replace_mirrordir(repodir)