Bug 83408 - Parser chokes on blank lines
Parser chokes on blank lines
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-nfs (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
:
: 84917 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-03 20:37 EST by John Stracke
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-14 11:39:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
One-line fix (363 bytes, patch)
2003-02-03 20:45 EST, John Stracke
no flags Details | Diff

  None (edit)
Description John Stracke 2003-02-03 20:37:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
I initially edited /etc/exports with vi, which, more or less by default, added a
blank line to the end.  This was fine, as far as exportfs was concerned; but,
when I later went to examine the settings with redhat-config-nfs, it crashed. 
The error output is:

Traceback (most recent call last):
  File "/usr/share/redhat-config-nfs/redhat-config-nfs.py", line 29, in ?
    mainWindow.mainWindow()
  File "/usr/share/redhat-config-nfs/mainWindow.py", line 141, in __init__
    self.exports = nfsBackend.NfsBackend()
  File "/usr/share/redhat-config-nfs/nfsBackend.py", line 31, in __init__
    self.parseFile()
  File "/usr/share/redhat-config-nfs/nfsBackend.py", line 89, in parseFile
    hostname, options = string.split(tokens[1], "(")
IndexError: list index out of range


(Note that, the first couple of times I tried it, I was using it from the menu,
and just didn't get any kind of feedback at all.  I think GNOME ought to have
some sort of convention for providing error messages on programs run via menu
items and launchers.)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Place a blank line in /etc/exports (I've seen it with the blank line at the
start and at the end).
2. Run redhat-config-nfs


Actual Results:  Error messages.

Expected Results:  A window coming up.

Additional info:
Comment 1 John Stracke 2003-02-03 20:45:08 EST
Created attachment 89823 [details]
One-line fix

Trivial patch: treat blank lines the same as comments.
Comment 2 Brent Fox 2003-02-04 15:58:01 EST
Patch applied.  Should be fixed in redhat-config-nfs-1.0.4-2.  Thanks for your help.

QA, please verify.
Comment 3 Brent Fox 2003-02-24 16:31:29 EST
*** Bug 84917 has been marked as a duplicate of this bug. ***
Comment 4 Peter van Egdom 2003-03-12 17:43:20 EST
- Inserted a lot of blank lines before a valid entry in /etc/exports.
- Inserted a lot of blank lines between a couple of valid entries in /etc/exports.
- Inserted a lot of blank lines after a couple of valid entries in /etc/exports.

In all cases, redhat-config-nfs-1.0.4-3 started properly and rewrote the
/etc/exports file without blanks.

So... verified fixed with "redhat-config-nfs-1.0.4-3" on Phoebe 8.0.94.
Comment 5 Brent Fox 2003-03-14 11:39:17 EST
Thanks for the testing.  Resolving as Rawhide.

Note You need to log in before you can comment on or make changes to this bug.