commit:     738c6f83b48c9f33ae17551b725756a1e94437fb
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 02:06:54 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 31 02:22:29 2022 +0000
URL:        https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=738c6f83

main.py: Fix bug 600572 Remove SYNC variable usage

Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 mirrorselect/main.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index b0a68cc..9cad25b 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -343,12 +343,12 @@ class MirrorSelect(object):
                @rtype: string
                '''
                if rsync:
-                       # startwith repos.conf
+                       # repos.conf
                        config_path = EPREFIX + 
'/etc/portage/repos.conf/gentoo.conf'
                        if not os.access(config_path, os.F_OK):
                                self.output.write("Failed access to 
gentoo.conf: "
                                        "%s\n" % os.access(config_path, 
os.F_OK), 2)
-                               return get_make_conf_path(EPREFIX)
+                               config_path = None
                        return config_path
                return get_make_conf_path(EPREFIX)
 
@@ -363,12 +363,12 @@ class MirrorSelect(object):
                self.output.verbosity = options.verbosity
                self.output.write("main(); config_path = %s\n" % config_path, 2)
 
-               # reset config_path to find repos.conf/gentoo.conf if it exists
+               # reset config_path to find repos.conf/gentoo.conf
                if options.rsync:
                        config_path = self.get_conf_path(options.rsync)
                        self.output.write("main(); reset config_path = %s\n" % 
config_path, 2)
-               else:
-                       self.output.write("main(); rsync = %s\n" % 
str(options.rsync),2)
+               if not config_path:
+                       self.output.print_err("main(); Exiting due to missing 
repos.conf/gentoo.conf file\n")
 
                fsmirrors = get_filesystem_mirrors(self.output,
                        config_path, options.rsync)

Reply via email to