Bug 468364 - typo in setGateway
Summary: typo in setGateway
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-24 12:11 UTC by Masato Taruishi
Modified: 2008-10-24 14:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-24 14:06:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Masato Taruishi 2008-10-24 12:11:30 UTC
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 12:12:55 UTC
How reproducible:

use network --gateway directive in kickstart

Comment 2 Chris Lumens 2008-10-24 14:06:39 UTC
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.