Bug 468364 - typo in setGateway
typo in setGateway
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-24 08:11 EDT by Masato Taruishi
Modified: 2008-10-24 10:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-24 10:06:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Masato Taruishi 2008-10-24 08:11:30 EDT
Description of problem:

When you put 'network --gateway' setting in a kickstart, you would get
the following errror:

  File "/usr/lib/python2.5/site-packages/pykickstart/parser.py", line 440, in handleCommand
    self.handler.dispatcher(args, lineno)
  File "/usr/lib/python2.5/site-packages/pykickstart/base.py", line 335, in dispatcher
    self.commands[cmd].parse(args[1:])
  File "/usr/lib/anaconda/kickstart.py", line 454, in parse
    self.handler.id.network.setGateway(nd.gateway, device)
  File "/usr/lib/anaconda/network.py", line 399, in setGateway
    self.netdevices[dev].set(('GATEWAY', gw))
NameError: global name 'dev' is not defined
install exited abnormally [1/1] 
disabling swap...
unmounting filesystems...
	/mnt/runtime done
	disabling /dev/loop0 LOOP_CLR_FD failed: 16
	/proc done
	/dev/pts done
	/sys done
	/selinux done
sending termination signals...done
sending kill signals...done
you may safely reboot your system

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

rawhide as of commit d5c0a7287fe810c06968687777bdca527a44258e

How reproducible:

use network --gateway <> directory in kickstart

Additional info:

The following patch would fix this problem:

diff --git a/network.py b/network.py
index b5b1590..d902c35 100644
--- a/network.py
+++ b/network.py
@@ -396,7 +396,7 @@ class Network:
             i += 1
 
     def setGateway(self, gw, device):
-        self.netdevices[dev].set(('GATEWAY', gw))
+        self.netdevices[device].set(('GATEWAY', gw))
 
     def lookupHostname(self):
         # can't look things up if they don't exist!
Comment 1 Masato Taruishi 2008-10-24 08:12:55 EDT
How reproducible:

use network --gateway directive in kickstart
Comment 2 Chris Lumens 2008-10-24 10:06:39 EDT
This will be fixed in the next build of anaconda.  Thanks for the report.

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