Avoid NameError when cwd is $FILESDIR. Thanks to Christian Ruppert <idl0r@g.o>
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:50:13 +0000 (19:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:50:13 +0000 (19:50 -0000)
for reporting. (trunk r15294)

svn path=/main/branches/2.1.7/; revision=15533

bin/repoman

index c84079555e20af25eb6fbffa0a2db90a1e48f7f2..eecf4d65035a56c4bcb66482bd49e49f7734a101 100755 (executable)
@@ -748,6 +748,12 @@ elif repolevel==3:
                caterror(catdir)
        scanlist.append(catdir+"/"+reposplit[-1])
        repo_subdir = scanlist[-1] + os.sep
+else:
+       msg = 'Repoman is unable to determine PORTDIR or PORTDIR_OVERLAY' + \
+               ' from the current working directory'
+       logging.critical(msg)
+       sys.exit(1)
+
 repo_subdir_len = len(repo_subdir)
 scanlist.sort()