For bug #172886, catch GetoptError. (trunk r6684)
authorZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 21:32:23 +0000 (21:32 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 21:32:23 +0000 (21:32 -0000)
svn path=/main/branches/2.1.2/; revision=6701

bin/ebuild

index b8b6cac414ac7617a17d4e5b7aa96a16a18c3865..8afba3afe564baa8953ee6e69507a164621ac73a 100755 (executable)
@@ -12,7 +12,11 @@ if len(sys.argv) <= 2:
        sys.exit(1)
 
 
-opts, pargs = getopt.getopt(sys.argv[1:], '', ['debug', 'force'])
+try:
+       opts, pargs = getopt.getopt(sys.argv[1:], '', ['debug', 'force'])
+except getopt.GetoptError, e:
+       print e
+       sys.exit(1)
 debug = ("--debug",'') in opts
 force = ("--force",'') in opts