[elbe-devel] [PATCH 18/20] elbexml: make ElbeXML.validate_repo() a staticmethod

Torben Hohn torben.hohn at linutronix.de
Fri Oct 12 11:28:04 CEST 2018


staticmethod does not have self parameter, but can be called via
self.method()

However, this is also a candidate for elbepack.debinstaller

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/elbexml.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index c7140741..98da677b 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -163,7 +163,8 @@ class ElbeXML(object):
 
         return mirror.replace("LOCALMACHINE", "10.0.2.2")
 
-    def validate_repo(self, opener, r, url_validation):
+    @staticmethod
+    def validate_repo(opener, r, url_validation):
         try:
             fp = opener.open(r["url"] + "InRelease", None, 10)
         except urllib2.URLError:
-- 
2.11.0




More information about the elbe-devel mailing list