Bug 83408

Summary: Parser chokes on blank lines
Product: [Retired] Red Hat Linux Reporter: John Stracke <francis+rh+bugzilla>
Component: redhat-config-nfsAssignee: Brent Fox <bfox>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: gordon.messmer, p.van.egdom
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-14 16:39:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
One-line fix none

Description John Stracke 2003-02-04 01:37:40 UTC
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-04 01:45:08 UTC
Created attachment 89823 [details]
One-line fix

Trivial patch: treat blank lines the same as comments.

Comment 2 Brent Fox 2003-02-04 20:58:01 UTC
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 21:31:29 UTC
*** Bug 84917 has been marked as a duplicate of this bug. ***

Comment 4 Peter van Egdom 2003-03-12 22:43:20 UTC
- 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 16:39:17 UTC
Thanks for the testing.  Resolving as Rawhide.