]> git.ipfire.org Git - ipfire.org.git/commitdiff
python3: More code cleanup
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 10:39:20 +0000 (11:39 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 10:39:20 +0000 (11:39 +0100)
No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/accounts.py
src/backend/database.py
src/backend/fireinfo.py
src/backend/iuse.py
src/backend/mirrors.py
src/backend/releases.py
src/backend/tracker.py
src/backend/util.py
src/backend/zeiterfassung.py
src/web/auth.py
src/web/handlers_base.py

index 2449658d0b0c60d021670bfe96959b6041afbfc2..752dff8a2a8bc5864ffe27237a099b4f3028b01f 100644 (file)
@@ -6,7 +6,8 @@ import io
 import hashlib
 import ldap
 import logging
-import urllib.request, urllib.parse, urllib.error
+import urllib.parse
+import urllib.request
 
 from .misc import Object
 
index ed64727cc1c84cb3231b822f5d993cb2ab2cf9dc..f79cf1283c68dd994aa2fe1fdc5cf9eaf1852b98 100644 (file)
@@ -8,12 +8,8 @@
        as torndb.
 """
 
-import copy
-import itertools
 import logging
-import os
 import psycopg2
-import time
 
 class Connection(object):
        """
index 0fbbbc408d5a748be85de1b966fe52f7dacc25cc..f84df7adcf0d3e7b0c83d9d6166c6ceec06a59d4 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 import datetime
 import hwdata
 import iso3166
index bc0812dc59c27469611ef35cb91ff24d8118ac17..a3c0c5724f05eac67144ee7ff612e76766cc079a 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 import io
 import logging
 import os.path
@@ -102,39 +100,6 @@ class ImageObject(Object):
                return self.request.locale
 
 
-#class Image1(ImageObject):
-#      id = 0
-#
-#      default_size = 500, 50
-#
-#      def draw(self):
-#              # Background
-#              self.paint.rectangle(((0, 0), self.default_size), fill="#000000")
-#
-#              # Release information
-#              self.paint.text((10, 10), "%s" % self.profile.release)
-#
-#              # Hardware information
-#              hw = [
-#                      self.profile.cpu.model_string,
-#                      "Mem: %.1fG" % (self.profile.memory / 1024**2),
-#              ]
-#
-#              if self.profile.virtual:
-#                      virt = "V-%s" % self.profile.hypervisor.vendor
-#                      if self.profile.hypervisor.type == "para":
-#                              virt = "%s-PV" % virt
-#                      hw.append(virt)
-#
-#              if self.profile.cpu.capable_64bit:
-#                      hw.append("64")
-#
-#              self.paint.text((10, 30), "%s" % " | ".join(hw))
-#
-#
-#IUse().add_imagetype(Image1)
-
-
 class Image1(ImageObject):
        id = 0
 
index 12d56c3a64e7858e5000a0df1886c3b4ffb04abe..0b743a79fc5d1efe93a0974f53a54aac3a3faef1 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 import datetime
 import logging
 import math
index 603778828aae173ab1aeeef04119294ac75a7c1f..2ed6db052d9627be29f7ae2eefa949a9f290f838 100644 (file)
@@ -4,7 +4,6 @@ import hashlib
 import logging
 import os
 import re
-import urllib.request, urllib.parse, urllib.error
 import urllib.parse
 
 from . import database
@@ -94,7 +93,7 @@ class File(Object):
 
        @property
        def url(self):
-                return urllib.parse.urljoin("https://downloads.ipfire.org", self.filename)
+               return urllib.parse.urljoin("https://downloads.ipfire.org", self.filename)
 
        @property
        def desc(self):
index f211967636ee9da7396f3850e172dc6a28b12757..7229905d5f498468091d367efe7ca925e3f5a321 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 def ncode_hex(s):
        return s.encode("hex")
 
index 616ab8784130eef67b7bef47faca126433fb1571..bcd8ca56111de46b9daaf4f2cb1ae22cac79b57e 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 def format_size(s):
        units = ("B", "k", "M", "G", "T")
 
index 6cd0dd0e7691c7f767e4c0ebda088f8017612ce2..aa0173e2b740d7cf2d75e14d1e7337e463b572ec 100644 (file)
@@ -5,7 +5,6 @@ import hmac
 import json
 import tornado.httpclient
 import tornado.gen
-import urllib.request, urllib.parse, urllib.error
 import urllib.parse
 
 from .misc import Object
index 795a05c9c643ddf006509cffa571fc77244b0a0d..17957145ab60159104564ac907a2ff4501f8f6ae 100644 (file)
@@ -38,7 +38,6 @@ class AuthenticationMixin(object):
                        self.clear_cookie("session_id")
 
 
-
 class LoginHandler(AuthenticationMixin, base.BaseHandler):
        def get(self):
                next = self.get_argument("next", None)
index 7afaa7985d4d8bba36c6442d1dd225d77c3aa429..4dce9fd2d9a8fdf6a816eb48159e02755836ac7b 100644 (file)
@@ -1,7 +1,5 @@
 #!/usr/bin/python
 
-
-
 import datetime
 import dateutil.parser
 import http.client