summaryrefslogtreecommitdiff
path: root/buildstream/_ostree.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2018-02-19 10:25:32 +0000
committerJames Ennis <james.ennis@codethink.com>2018-03-14 17:31:06 +0000
commitdfa45f0415bcaa623ee121789a0935100fd34f6a (patch)
tree26a18d9a69999555a489ee7c1cbd54da30d42e59 /buildstream/_ostree.py
parent4cfa0bdffbaacfbaf12ec8c6ab2f52bace0ef716 (diff)
downloadbuildstream-dfa45f0415bcaa623ee121789a0935100fd34f6a.tar.gz
pylint - dealt with redefined-outer-name and redefined-built in warnings
Diffstat (limited to 'buildstream/_ostree.py')
-rw-r--r--buildstream/_ostree.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py
index a1f01aa96..0abb51da8 100644
--- a/buildstream/_ostree.py
+++ b/buildstream/_ostree.py
@@ -77,10 +77,10 @@ def ensure(path, compress):
# Args:
# repo (OSTree.Repo): The repo
# path (str): The checkout path
-# commit (str): The commit checksum to checkout
+# commit_ (str): The commit checksum to checkout
# user (boot): Whether to checkout in user mode
#
-def checkout(repo, path, commit, user=False):
+def checkout(repo, path, commit_, user=False):
# Check out a full copy of an OSTree at a given ref to some directory.
#
@@ -111,9 +111,9 @@ def checkout(repo, path, commit, user=False):
# current working directory.
AT_FDCWD = -100
try:
- repo.checkout_at(options, AT_FDCWD, path, commit)
+ repo.checkout_at(options, AT_FDCWD, path, commit_)
except GLib.GError as e:
- raise OSTreeError("Failed to checkout commit '{}': {}".format(commit, e.message)) from e
+ raise OSTreeError("Failed to checkout commit '{}': {}".format(commit_, e.message)) from e
# commit():
@@ -124,10 +124,10 @@ def checkout(repo, path, commit, user=False):
#
# Args:
# repo (OSTree.Repo): The repo
-# dir (str): The source directory to commit to the repo
+# dir_ (str): The source directory to commit to the repo
# refs (list): A list of symbolic references (tag) for the commit
#
-def commit(repo, dir, refs):
+def commit(repo, dir_, refs):
def commit_filter(repo, path, file_info):
@@ -148,7 +148,7 @@ def commit(repo, dir, refs):
try:
# add tree to repository
mtree = OSTree.MutableTree.new()
- repo.write_directory_to_mtree(Gio.File.new_for_path(dir),
+ repo.write_directory_to_mtree(Gio.File.new_for_path(dir_),
mtree, commit_modifier)
_, root = repo.write_mtree(mtree)
@@ -239,8 +239,8 @@ def exists(repo, ref):
#
def checksum(repo, ref):
- _, checksum = repo.resolve_rev(ref, True)
- return checksum
+ _, checksum_ = repo.resolve_rev(ref, True)
+ return checksum_
# fetch()