commit: 0ba6b009b50576af0f492c88af80b4a958f19d4d
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 8 15:46:59 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Aug 8 15:46:59 2015 +0000
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=0ba6b009
Switch to gnu_getopt.
bin/grsrun | 4 ++--
bin/grsup | 4 ++--
utils/most-dependant | 15 +++++++++++----
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/bin/grsrun b/bin/grsrun
index c5e5240..df8803c 100755
--- a/bin/grsrun
+++ b/bin/grsrun
@@ -10,7 +10,7 @@ from grs import CONST
from grs import Execute
from grs import Interpret
-from getopt import getopt, GetoptError
+from getopt import gnu_getopt, GetoptError
def usage(rc=1):
@@ -30,7 +30,7 @@ flags: Release run. Do every step in build
script.
def main():
try:
- opts, x = getopt(sys.argv[1:], 'mus:h')
+ opts, x = gnu_getopt(sys.argv[1:], 'mus:h')
except GetoptError as e:
usage()
diff --git a/bin/grsup b/bin/grsup
index 3d5d1cc..dc6c9c4 100755
--- a/bin/grsup
+++ b/bin/grsup
@@ -8,7 +8,7 @@ import signal
import sys
import urllib.request
-from getopt import getopt, GetoptError
+from getopt import gnu_getopt, GetoptError
from html.parser import HTMLParser
from grs import CONST
@@ -131,7 +131,7 @@ def main():
myaction, myopts, myfiles = parse_opts(sys.argv[1:])
try:
- opts, x = getopt(sys.argv[1:], 'lDk:rdh')
+ opts, x = gnu_getopt(sys.argv[1:], 'lDk:rdh')
sanitize(opts, x)
except GetoptError:
usage()
diff --git a/utils/most-dependant b/utils/most-dependant
index 4ca432b..67cfdbf 100755
--- a/utils/most-dependant
+++ b/utils/most-dependant
@@ -1,13 +1,20 @@
#!/usr/bin/env python
import portage
-import getopt, re
-import os, shlex, shutil, sys, subprocess
+import os
+import re
+import shlex
+import shutil
+import subprocess
+import sys
+
from copy import deepcopy
+from getopt import gnu_getopt, GetoptError
+
try:
- opts, args = getopt.getopt(sys.argv[1:], 'ea:pv')
-except getopt.GetoptError as e:
+ opts, args = gnu_getopt(sys.argv[1:], 'ea:pv')
+except GetoptError as e:
print(e)
sys.exit(1)