diff options
| author | Michael DeHaan <mdehaan@redhat.com> | 2008-07-23 14:53:04 -0400 |
|---|---|---|
| committer | Michael DeHaan <mdehaan@redhat.com> | 2008-07-23 14:53:04 -0400 |
| commit | bcd0b97208e82075a91ada91ff668b8f42d6638e (patch) | |
| tree | 672ecc7987283743b1b17cc19b794a6445f2e0df /scripts/cobbler-completion | |
| parent | ae11224aeae49f3cacfe34483983191e554bfcc7 (diff) | |
| download | cobbler-bcd0b97208e82075a91ada91ff668b8f42d6638e.tar.gz cobbler-bcd0b97208e82075a91ada91ff668b8f42d6638e.tar.xz cobbler-bcd0b97208e82075a91ada91ff668b8f42d6638e.zip | |
Make cobbler-completion work with no args
Diffstat (limited to 'scripts/cobbler-completion')
| -rwxr-xr-x | scripts/cobbler-completion | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/cobbler-completion b/scripts/cobbler-completion index d8739530..e4d47010 100755 --- a/scripts/cobbler-completion +++ b/scripts/cobbler-completion @@ -47,13 +47,19 @@ def find_completion(args): #print "DEBUG: arguments are: %s" % arguments #print "DEBUG: options are: %s" % options - last = args[-1] + try: + last = args[-1] + except: + last = None return find_options(datastruct, arguments, last) def find_options(datastruct, arguments, last): + if last is None: + return datastruct + for x in TAKES_A_FILE: x2 = "%s=" % x if last == x or last == x2: |
