summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-02-19 13:34:09 -0500
committerMike Frysinger <vapier@google.com>2021-02-19 20:06:20 +0000
commit5d9c4972e075afb55dca0f65095b2c7dfffdf389 (patch)
tree512d667e1ede4eb0a54a9b8bdcdfdfc0583a7b40 /manifest_xml.py
parent057905fa1d074e6dd341822e5a6a1e49b6b97a21 (diff)
downloadgit-repo-5d9c4972e075afb55dca0f65095b2c7dfffdf389.tar.gz
use simpler super() magic
Python 3 has a simpler super() style so switch to it to make the code a little simpler and to stop pylint warnings. Change-Id: I1b3ccf57ae968d56a9a0bcfc1258fbd8bfa3afee Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297383 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 84e3d9f9..ff8e0612 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -1301,7 +1301,7 @@ class GitcManifest(XmlManifest):
1301 1301
1302 def _ParseProject(self, node, parent=None): 1302 def _ParseProject(self, node, parent=None):
1303 """Override _ParseProject and add support for GITC specific attributes.""" 1303 """Override _ParseProject and add support for GITC specific attributes."""
1304 return super(GitcManifest, self)._ParseProject( 1304 return super()._ParseProject(
1305 node, parent=parent, old_revision=node.getAttribute('old-revision')) 1305 node, parent=parent, old_revision=node.getAttribute('old-revision'))
1306 1306
1307 def _output_manifest_project_extras(self, p, e): 1307 def _output_manifest_project_extras(self, p, e):
@@ -1325,7 +1325,7 @@ class RepoClient(XmlManifest):
1325 if manifest_file is None: 1325 if manifest_file is None:
1326 manifest_file = os.path.join(repodir, MANIFEST_FILE_NAME) 1326 manifest_file = os.path.join(repodir, MANIFEST_FILE_NAME)
1327 local_manifests = os.path.abspath(os.path.join(repodir, LOCAL_MANIFESTS_DIR_NAME)) 1327 local_manifests = os.path.abspath(os.path.join(repodir, LOCAL_MANIFESTS_DIR_NAME))
1328 super(RepoClient, self).__init__(repodir, manifest_file, local_manifests) 1328 super().__init__(repodir, manifest_file, local_manifests)
1329 1329
1330 # TODO: Completely separate manifest logic out of the client. 1330 # TODO: Completely separate manifest logic out of the client.
1331 self.manifest = self 1331 self.manifest = self
@@ -1340,6 +1340,5 @@ class GitcClient(RepoClient, GitcManifest):
1340 self.gitc_client_dir = os.path.join(gitc_utils.get_gitc_manifest_dir(), 1340 self.gitc_client_dir = os.path.join(gitc_utils.get_gitc_manifest_dir(),
1341 gitc_client_name) 1341 gitc_client_name)
1342 1342
1343 super(GitcManifest, self).__init__( 1343 super().__init__(repodir, os.path.join(self.gitc_client_dir, '.manifest'))
1344 repodir, os.path.join(self.gitc_client_dir, '.manifest'))
1345 self.isGitcClient = True 1344 self.isGitcClient = True