summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-05-08 11:49:33 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-05-08 11:49:33 +0200
commitf066a45907943886510fdfe0654be31fcbf758d5 (patch)
tree36e1ffc16682c4b35598421b0f21040be5864472
parent37cde4ed5d2e9130703cb6e08cf47b9e9bceb9b1 (diff)
downloadtools-f066a45907943886510fdfe0654be31fcbf758d5.tar.gz
tools-f066a45907943886510fdfe0654be31fcbf758d5.tar.bz2
tools-f066a45907943886510fdfe0654be31fcbf758d5.zip
bin/hostinfo: allow intermixing of option and non-option arguments
-rwxr-xr-xbin/hostinfo2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/hostinfo b/bin/hostinfo
index ea785d8..1ee31d5 100755
--- a/bin/hostinfo
+++ b/bin/hostinfo
@@ -48,7 +48,7 @@ def find_host(host, key=None, oneline=False):
def main():
self_name = sys.argv.pop(0)
- optlist, args = getopt.getopt(sys.argv, 'o', ['oneline'])
+ optlist, args = getopt.gnu_getopt(sys.argv, 'o', ['oneline'])
flags = [opt for (opt, _) in optlist]
oneline = '--oneline' in flags or '-o' in flags