[PATCH 2/2] Get rid of trailing whitespace
Vratislav Podzimek
vpodzime at redhat.com
Thu Oct 31 16:05:04 UTC 2013
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/addons.py | 2 +-
pyanaconda/isys/__init__.py | 2 +-
pyanaconda/kickstart.py | 4 ++--
pyanaconda/ui/common.py | 6 +++---
pyanaconda/ui/gui/__init__.py | 20 ++++++++++----------
pyanaconda/ui/gui/hubs/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 4 ++--
pyanaconda/ui/gui/spokes/user.py | 14 +++++++-------
pyanaconda/ui/tui/__init__.py | 2 +-
pyanaconda/ui/tui/spokes/__init__.py | 6 +++---
11 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py
index 343b2dc..8202a1d 100644
--- a/pyanaconda/addons.py
+++ b/pyanaconda/addons.py
@@ -46,7 +46,7 @@ def collect_addon_paths(toplevel_addon_paths, ui_subdir="gui"):
directories = os.listdir(path)
except OSError:
directories = []
-
+
for addon_id in directories:
addon_ks_path = os.path.join(path, addon_id, "ks")
if os.path.isdir(addon_ks_path):
diff --git a/pyanaconda/isys/__init__.py b/pyanaconda/isys/__init__.py
index d502b13..c4bc302 100644
--- a/pyanaconda/isys/__init__.py
+++ b/pyanaconda/isys/__init__.py
@@ -58,7 +58,7 @@ EARLY_SWAP_RAM = 896 * 1024
## Get the amount of free space available under a directory path.
# @param path The directory path to check.
-# @return The amount of free space available, in
+# @return The amount of free space available, in
def pathSpaceAvailable(path):
return _isys.devSpaceFree(path)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 8f91885..c424e2e 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1615,8 +1615,8 @@ class AnacondaPreParser(KickstartParser):
self.registerSection(NullSection(self.handler, sectionOpen="%traceback"))
self.registerSection(NullSection(self.handler, sectionOpen="%packages"))
self.registerSection(NullSection(self.handler, sectionOpen="%addon"))
-
-
+
+
class AnacondaKSParser(KickstartParser):
def __init__ (self, handler, followIncludes=True, errorsAreFatal=True,
missingIncludeIsFatal=True, scriptClass=AnacondaKSScript):
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index dfff1f6..667ec51 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -560,7 +560,7 @@ def collect(module_pattern, path, pred):
# when the directory "path" does not exist
except OSError:
return []
-
+
for module_file in contents:
if (not module_file.endswith(".py")) and \
(not module_file.endswith(".so")):
@@ -623,7 +623,7 @@ def collect(module_pattern, path, pred):
# restore the extension dot eaten by split
loaded_ext = "." + loaded_ext
-
+
# do not collect classes when the module is already imported
# from different path than we are traversing
# this condition checks the module name without file extension
@@ -665,7 +665,7 @@ def collect(module_pattern, path, pred):
members = [(name, getattr(module, name))
for name in module.__all__
if p(getattr(module, name))]
-
+
for (name, val) in members:
retval.append(val)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 52161ff..645c8e8 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -51,7 +51,7 @@ class GUICheck(object):
:param parent: The parent GUIObject. When a check state changes,
the GUICheck will call set_error(check, check-state)
:type parent: GUIObject
-
+
:param editable: The input field being checked
:type editable: GtkEditable
@@ -128,7 +128,7 @@ class GUICheck(object):
@property
def check_data(self):
return self._check_data
-
+
class GUIObject(common.UIObject):
"""This is the base class from which all other GUI classes are derived. It
thus contains only attributes and methods that are common to everything
@@ -305,14 +305,14 @@ class GUIObject(common.UIObject):
value is an object used by update_check, or
GUICheck.CHECK_OK if the check passes.
:type run_check: function
-
+
:param check_data: additional data to pass to the check function
:param set_error: a function called when a check changes state. The
parameters are (GUICheck, run_check_return). The
return value is ignored.
:type set_error: function
-
+
:returns: A check object
:rtype: GUICheck
"""
@@ -326,7 +326,7 @@ class GUIObject(common.UIObject):
def add_re_check(self, editable, regex, message, set_error=None):
"""Add a check using a regular expresion.
-
+
:param editable: the input field to validate
:type editable: GtkEditable
@@ -346,7 +346,7 @@ class GUIObject(common.UIObject):
"""
if not set_error:
set_error = self.set_check_error
- return self.add_check(editable=editable, run_check=check_re,
+ return self.add_check(editable=editable, run_check=check_re,
check_data={'regex': regex, 'message': message}, set_error=set_error)
def update_check(self, check, check_status):
@@ -397,7 +397,7 @@ class GUIDialog(GUIObject):
GUIObject.__init__(self, data)
- def add_check_with_error_label(self, editable, error_label, run_check,
+ def add_check_with_error_label(self, editable, error_label, run_check,
check_data=None, set_error=None):
"""Add an input validation check to this dialog. The error_label will
be added to the check_data for the validation check and will be
@@ -414,21 +414,21 @@ class GUIDialog(GUIObject):
value is an object used by update_check, or
GUICheck.CHECK_OK if the check passes.
:type run_check: function
-
+
:param check_data: additional data to pass to the check function
:param set_error: a function called when a check changes state. The
parameters are (GUICheck, run_check_return). The
return value is ignored.
:type set_error: function
-
+
:returns: A check object
:rtype: GUICheck
"""
if not set_error:
set_error = self.set_check_error
- return self.add_check(editable=editable, run_check=run_check,
+ return self.add_check(editable=editable, run_check=run_check,
check_data={'error_label': error_label, 'message': check_data},
set_error=set_error)
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 8ad76db..0a35e34 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -417,7 +417,7 @@ class Hub(GUIObject, common.Hub):
# autoContinue feature and wait for the user to explicitly state
# that he is done configuring by pressing the continue button.
self._autoContinue = False
-
+
self._inSpoke = True
self._runSpoke(spoke)
self._inSpoke = False
diff --git a/pyanaconda/ui/gui/spokes/__init__.py b/pyanaconda/ui/gui/spokes/__init__.py
index d0e56c5..b5c6f7f 100644
--- a/pyanaconda/ui/gui/spokes/__init__.py
+++ b/pyanaconda/ui/gui/spokes/__init__.py
@@ -110,5 +110,5 @@ def collect_spokes(mask_paths, category):
spokes = []
for mask, path in mask_paths:
spokes.extend(collect(mask, path, lambda obj: hasattr(obj, "category") and obj.category != None and obj.category.__name__ == category))
-
+
return spokes
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index f9cb17a..d8bde3c 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1377,7 +1377,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# accordingly
self._update_all_devices_in_selectors()
self._error = e
- self.set_warning(_(device_configuration_error_msg))
+ self.set_warning(_(device_configuration_error_msg))
self.window.show_all()
if _device is None:
@@ -2347,7 +2347,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.__storage.devicetree.names.remove(container.name)
self.__storage.devicetree.names.append(self._device_container_name)
- # until there's a setter for btrfs volume name
+ # until there's a setter for btrfs volume name
container._name = self._device_container_name
if container.format.type == "btrfs":
container.format.label = self._device_container_name
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 21d0388..909359e 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -85,8 +85,8 @@ class AdvancedUserDialog(GUIDialog):
self._grabObjects()
# Validate the group input box
- self.add_check_with_error_label(editable=self._tGroups,
- error_label=self._groupsError,
+ self.add_check_with_error_label(editable=self._tGroups,
+ error_label=self._groupsError,
run_check=_validateGroups)
def update_check(self, check, check_status):
@@ -279,7 +279,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
# - if a password is specified and the confirm box is empty or match, how strong is it?
# - if a password is required, is there any data in the confirm box?
self.add_check(self.pw, self._checkPasswordEmpty)
-
+
# The password confirmation needs to be checked whenever either of the password
# fields change. Separate checks are created on each field so that edits on
# either will trigger a check and so that the last edited field will get the focus
@@ -469,7 +469,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _checkPasswordEmpty(self, editable, data):
"""Check whether a password has been specified at all.
-
+
This check is used for both the password and the confirmation.
"""
@@ -496,7 +496,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
# to reset the status, just return success
if reset_status:
return GUICheck.CHECK_OK
-
+
# Skip the check if no password is required
if (not self.usepassword.get_active()) or self._user.password_kickstarted:
result = GUICheck.CHECK_OK
@@ -516,7 +516,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
def _checkPasswordStrength(self, editable=None, data=None):
"""Update the error message based on password strength.
-
+
The password strength has already been checked in _updatePwQuality, called
previously in the signal chain. This method converts the data set from there
into an error message.
@@ -536,7 +536,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
return self._pwq_error
pwstrength = self.pw_bar.get_value()
-
+
if pwstrength < 2:
# If Done has been clicked twice, waive the check
if self._waivePasswordClicks > 1:
diff --git a/pyanaconda/ui/tui/__init__.py b/pyanaconda/ui/tui/__init__.py
index 1b12fb9..402d625 100644
--- a/pyanaconda/ui/tui/__init__.py
+++ b/pyanaconda/ui/tui/__init__.py
@@ -79,7 +79,7 @@ class TextUserInterface(ui.UserInterface):
as final (True) or development
(False) version.
:type isFinal: bool
-
+
:param quitMessage: The text to be used in quit
dialog question. It should not
be translated to allow for change
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 88153e4..9de4b8b 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -294,13 +294,13 @@ def collect_spokes(mask_paths, category):
spokes = []
for mask, path in mask_paths:
spokes.extend(collect(mask, path, lambda obj: hasattr(obj, "category") and obj.category != None and obj.category == category))
-
+
return spokes
-
+
def collect_categories(mask_paths):
classes = []
for mask, path in mask_paths:
classes.extend(collect(mask, path, lambda obj: hasattr(obj, "category") and obj.category != None and obj.category != ""))
-
+
categories = set(c.category for c in classes)
return categories
--
1.7.11.7
More information about the anaconda-patches
mailing list