FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 12-11-2008, 07:05 PM
Hans de Goede
 
Default PATCH: fix various *syntax* errors in master

Hi all,

This patch fixes the following syntax errors caught by pychecker:
iw/lvm_dialog_gui.py:1024: Invalid arguments to (createSuggestedVGName), got 1,
expected 2
iw/welcome_gui.py:67: No global (sys) found
textw/network_text.py:75: No global (herrors) found
textw/welcome_text.py:44: No global (sys) found

I choose to rename neterrors to herrors, instead of replacing the use of the
undefined herrors with neterrors, to make things identical between textmode and
gui mode, to avoid copy and paste errors like this one in the future.

Regards,

Hans

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 58793b7..25c0e6d 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -967,7 +967,7 @@ class VolumeGroupEditor:
self.dialog.destroy()
self.dialog = None

- def __init__(self, partitions, diskset, intf, parent, origvgrequest, isNew = 0):
+ def __init__(self, anaconda, partitions, diskset, intf, parent, origvgrequest, isNew = 0):
self.partitions = partitions
self.diskset = diskset
self.origvgrequest = origvgrequest
@@ -1021,7 +1021,7 @@ class VolumeGroupEditor:
if not self.isNew:
self.volnameEntry.set_text(self.origvgrequest.volu meGroupName)
else:
- self.volnameEntry.set_text(lvm.createSuggestedVGNa me(self.partitions))
+ self.volnameEntry.set_text(lvm.createSuggestedVGNa me(self.partitions, anaconda.id.network))
else:
lbl = createAlignedLabel(_("Volume Group Name:"))
self.volnameEntry = gtk.Label(self.origvgrequest.volumeGroupName)
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 384758d..b2c11fd 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1146,7 +1146,8 @@ class PartitionWindow(InstallWindow):
return 1

def editLVMVolumeGroup(self, origvgrequest, isNew = 0):
- vgeditor = lvm_dialog_gui.VolumeGroupEditor(self.partitions,
+ vgeditor = lvm_dialog_gui.VolumeGroupEditor(self.anaconda,
+ self.partitions,
self.diskset,
self.intf, self.parent,
origvgrequest, isNew)
diff --git a/iw/welcome_gui.py b/iw/welcome_gui.py
index 8dc1a7e..d2e6fc5 100644
--- a/iw/welcome_gui.py
+++ b/iw/welcome_gui.py
@@ -19,6 +19,7 @@

import gtk
import gui
+import sys
from iw_gui import *

from constants import *
diff --git a/textw/network_text.py b/textw/network_text.py
index 0b90405..f35510f 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -59,7 +59,7 @@ class HostnameWindow:
return INSTALL_BACK

hostname = string.strip(hostEntry.value())
- neterrors = network.sanityCheckHostname(hostname)
+ herrors = network.sanityCheckHostname(hostname)

if not hostname:
ButtonChoiceWindow(_("Error with Hostname"),
@@ -68,7 +68,7 @@ class HostnameWindow:
buttons = [ _("OK") ])
continue

- if neterrors is not None:
+ if herrors is not None:
ButtonChoiceWindow(_("Error with Hostname"),
_("The hostname "%s" is not valid for the "
"following reason:

%s")
diff --git a/textw/welcome_text.py b/textw/welcome_text.py
index c0f771d..bf58b58 100644
--- a/textw/welcome_text.py
+++ b/textw/welcome_text.py
@@ -20,6 +20,7 @@
from snack import *
from constants_text import *
from constants import *
+import sys
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org