[gimp-web/wip/Jehan/issue-236-new-sponsor-page: 15/15] content, plugins, tools: some cleaning of mirrors2.json references.




commit 98254a7fdb455011d4712ae4d6debd625d3fa667
Author: Jehan <jehan girinstud io>
Date:   Tue Aug 31 15:46:57 2021 +0200

    content, plugins, tools: some cleaning of mirrors2.json references.
    
    - Change some remaining references to mirrors.json.
    - Remove an outdated gimp_mirrors.py.orig which might have been
      committed by mistake in early versions.
    - Remove now irrelevant comment.
    - Remove mirrors2.json file itself.

 content/downloads/mirrors2.json           | 99 -------------------------------
 plugins/gimp_mirrors/gimp_mirrors.py      |  4 +-
 plugins/gimp_mirrors/gimp_mirrors.py.orig | 96 ------------------------------
 tools/downloads/update-mirrors.py         |  4 --
 4 files changed, 2 insertions(+), 201 deletions(-)
---
diff --git a/plugins/gimp_mirrors/gimp_mirrors.py b/plugins/gimp_mirrors/gimp_mirrors.py
index 439d7088..34a72763 100644
--- a/plugins/gimp_mirrors/gimp_mirrors.py
+++ b/plugins/gimp_mirrors/gimp_mirrors.py
@@ -71,7 +71,7 @@ def do_mirrors(path, context):
         # instantiate geoip object, load db 
         gi = pygeoip.GeoIP('./plugins/gimp_mirrors/GeoIP.dat')
 
-        # load mirrors2.json file from content
+        # load mirrors.json file from content
         try:
             with open('./content/downloads/mirrors.json') as data_file:
                 data = json.load(data_file)
@@ -132,7 +132,7 @@ def do_mirrors(path, context):
                 with open( path, 'r') as f:
                     s = f.read()
                     #print s.decode('utf-8')
-                    s = s.decode('utf-8').replace(u"<!-- MIRRORS -->", u"<p><small>Cannot open 
mirrors2.json</small></p>")
+                    s = s.decode('utf-8').replace(u"<!-- MIRRORS -->", u"<p><small>Cannot open 
mirrors.json</small></p>")
 
                 with open( path, 'w') as f:
                     f.write( s.encode('utf-8') )
diff --git a/tools/downloads/update-mirrors.py b/tools/downloads/update-mirrors.py
index 77a166dd..ffdac056 100755
--- a/tools/downloads/update-mirrors.py
+++ b/tools/downloads/update-mirrors.py
@@ -6,10 +6,6 @@ import os
 import paramiko
 import sys
 
-# TODO: we will also want to update content/downloads/mirrors2.json as
-# it was decided to follow the same list. But first we have to contact
-# existing mirrors to propose to follow GNOME process, not directly
-# remove them from the list, which would not be too nice.
 parser = argparse.ArgumentParser(description='Update the list of mirrors as per download.gimp.org 
configuration.')
 parser.add_argument('--mirrorsfile', metavar='<file>', default=os.path.dirname(__file__) + 
'/downloads.http.txt',
                     help='A file with one download mirror per line, either https:// or http://. This script 
will override the existing file.')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]