From: Zac Medico Date: Thu, 31 May 2007 21:32:23 +0000 (-0000) Subject: For bug #172886, catch GetoptError. (trunk r6684) X-Git-Tag: v2.1.2.10~28 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=518ad86c5649946f3cbbfdf1196b32f3970fd35a;p=portage.git For bug #172886, catch GetoptError. (trunk r6684) svn path=/main/branches/2.1.2/; revision=6701 --- diff --git a/bin/ebuild b/bin/ebuild index b8b6cac41..8afba3afe 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -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