From 97fb0411763063d5f6163618e5aab2f3700f630f Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 25 Jul 2015 03:38:52 +0200 Subject: Fix errros with old pylint/pep8 For Python2.4 we need older version of pylint and pep8, that finds some more errors: - On python2.4 _ast is not available and pylint uses compiler.ast, that seems to have some problems with the line numbers if a comment is following the pylint disable marker. - In python2.4 there is no xml.etree. But we can ignore this error because Client.XML tries to find a suitable library. - Some small formatting issues. --- src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py') diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py b/src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py index f4f1ee4bf..ad9a740a6 100644 --- a/src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py +++ b/src/lib/Bcfg2/Client/Tools/POSIX/Augeas.py @@ -249,8 +249,8 @@ class POSIXAugeas(POSIXTool): for cmd in self.get_commands(entry): try: if not cmd.verify(): - err = "Augeas: Command has not been applied to %s: %s" % \ - (entry.get("name"), cmd) + err = ("Augeas: Command has not been applied to %s: %s" % + (entry.get("name"), cmd)) self.logger.debug(err) entry.set('qtext', "\n".join([entry.get('qtext', ''), err])) @@ -259,8 +259,8 @@ class POSIXAugeas(POSIXTool): else: cmd.command.set("verified", "true") except: # pylint: disable=W0702 - err = "Augeas: Unexpected error verifying %s: %s: %s" % \ - (entry.get("name"), cmd, sys.exc_info()[1]) + err = ("Augeas: Unexpected error verifying %s: %s: %s" % + (entry.get("name"), cmd, sys.exc_info()[1])) self.logger.error(err) entry.set('qtext', "\n".join([entry.get('qtext', ''), err])) rv = False -- cgit v1.2.3-1-g7c22