Avoid NameError when cwd is $FILESDIR. Thanks to Christian Ruppert <idl0r@g.o>
authorZac Medico <zmedico@gentoo.org>
Sat, 30 Jan 2010 22:49:12 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 30 Jan 2010 22:49:12 +0000 (22:49 -0000)
for reporting.

svn path=/main/trunk/; revision=15294

bin/repoman

index 95a44f0ff282875318acd6fd7ba062feaa4088d0..857f4612e4bc5d614a57553a863008051f0207d8 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()