[elbe-devel] [PATCH 16/25] pylint - elbexml/setrepo: remove unused parameter

Manuel Traut manut at linutronix.de
Wed Aug 29 21:02:46 CEST 2018


auth is used nowhere, so remove it

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/commands/setrepo.py | 5 +----
 elbepack/elbexml.py          | 8 ++++----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/elbepack/commands/setrepo.py b/elbepack/commands/setrepo.py
index 63873f87..f98d59ed 100644
--- a/elbepack/commands/setrepo.py
+++ b/elbepack/commands/setrepo.py
@@ -21,8 +21,6 @@ def run_command(argv):
                        dest="targetpath", default="debian")
     oparser.add_option("--protocol", help="protocol to access the repo",
                        dest="protocol", default="http")
-    oparser.add_option("--auth", help="don't set the noauth flag",
-                       dest="auth", default=False)
     (opt, args) = oparser.parse_args(argv)
 
     if len(args) < 2:
@@ -40,8 +38,7 @@ def run_command(argv):
         xml.set_repo(args[1],
                      opt.initvmpath,
                      opt.targetpath,
-                     opt.protocol,
-                     opt.auth)
+                     opt.protocol)
     except Exception as e:
         print("Error setting repo %s: %s" % (args[1], str(e)))
         sys.exit(20)
diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index 408f3352..a5ba32d7 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -120,7 +120,7 @@ class ElbeXML(object):
 
         return mirror.replace("LOCALMACHINE", "10.0.2.2")
 
-    def _set_repo(self, project, mirror, path, proto='http', auth=False, src=True):
+    def _set_repo(self, project, mirror, path, proto='http', src=True):
         m = project.node("mirror")
         m.clear() # this also clears url-list
         h = m.ensure_child("primary_host")
@@ -142,13 +142,13 @@ class ElbeXML(object):
                                                project.text("suite")))
         project.ensure_child("noauth")
 
-    def set_repo(self, mirror, inintvmpath, targetpath, proto='http', auth=False):
+    def set_repo(self, mirror, inintvmpath, targetpath, proto='http'):
         i = self.node("initvm")
         if i:
-            self._set_repo(i, mirror, inintvmpath, proto, auth)
+            self._set_repo(i, mirror, inintvmpath, proto)
         t = self.prj
         if t:
-            self._set_repo(t, mirror, targetpath, proto, auth, src=True)
+            self._set_repo(t, mirror, targetpath, proto, src=True)
 
     # XXX: maybe add cdrom path param ?
     def create_apt_sources_list(self, build_sources=False):
-- 
2.18.0




More information about the elbe-devel mailing list