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.volumeGroupName) else: - self.volnameEntry.set_text(lvm.createSuggestedVGName(self.partitions)) + self.volnameEntry.set_text(lvm.createSuggestedVGName(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:\n\n%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@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list