aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/bin/xpak-helper.py')
-rwxr-xr-xportage_with_autodep/bin/xpak-helper.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/portage_with_autodep/bin/xpak-helper.py b/portage_with_autodep/bin/xpak-helper.py
index ef74920..d9d325d 100755
--- a/portage_with_autodep/bin/xpak-helper.py
+++ b/portage_with_autodep/bin/xpak-helper.py
@@ -1,11 +1,12 @@
#!/usr/bin/python
-# Copyright 2009-2011 Gentoo Foundation
+# Copyright 2009-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import optparse
import sys
import portage
+portage._internal_caller = True
from portage import os
+from portage.util._argparse import ArgumentParser
def command_recompose(args):
@@ -45,8 +46,8 @@ def main(argv):
usage = "usage: %s COMMAND [args]" % \
os.path.basename(argv[0])
- parser = optparse.OptionParser(description=description, usage=usage)
- options, args = parser.parse_args(argv[1:])
+ parser = ArgumentParser(description=description, usage=usage)
+ options, args = parser.parse_known_args(argv[1:])
if not args:
parser.error("missing command argument")