From 3cc2fd0d5d3b90ddb8b786694b8a85173b69d406 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 23 May 2007 17:32:11 +0000 Subject: [PATCH] I would be very delighted if people could run tabnanny themselves, as indenting python is absolutely horrible work, since Vim can't help you with that due to this indenting=scope thing. It also makes python itself kind of upset usually if you mix up tabs with spaces, so another reason to run tabnanny. svn path=/main/branches/prefix/; revision=6599 --- bin/dispatch-conf | 48 +++++++++++++++++++++++------------------------ tabcheck.py | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index c0b5c0138..3fe8cb2ee 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -13,7 +13,7 @@ # if not hasattr(__builtins__, "set"): - from sets import Set as set + from sets import Set as set from stat import * from random import * @@ -21,9 +21,9 @@ import atexit, commands, os, re, shutil, stat, sys try: import portage except ImportError: - from os import path as osp - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - import portage + from os import path as osp + sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) + import portage from portage import dispatch_conf, const from portage.process import find_binary @@ -140,26 +140,26 @@ class dispatch: else: newconf = conf['new'] - if newconf == mrgconf and \ - self.options.get('ignore-previously-merged') != 'yes' and \ - len(commands.getoutput(DIFF_CONTENTS % (conf['current'], mrgconf))) == 0: - # The current update is identical to the archived .dist - # version that has previously been merged. - os.unlink(mrgconf) - newconf = conf['new'] - - mystatus, myoutput = commands.getstatusoutput( - DIFF_CONTENTS % (conf ['current'], newconf)) - same_file = 0 == len(myoutput) - if mystatus >> 8 == 2: - # Binary files differ - same_cvs = False - same_wsc = False - else: - same_cvs = 0 == len(commands.getoutput( - DIFF_CVS_INTERP % (conf ['current'], newconf))) - same_wsc = 0 == len(commands.getoutput( - DIFF_WSCOMMENTS % (conf ['current'], newconf))) + if newconf == mrgconf and \ + self.options.get('ignore-previously-merged') != 'yes' and \ + len(commands.getoutput(DIFF_CONTENTS % (conf['current'], mrgconf))) == 0: + # The current update is identical to the archived .dist + # version that has previously been merged. + os.unlink(mrgconf) + newconf = conf['new'] + + mystatus, myoutput = commands.getstatusoutput( + DIFF_CONTENTS % (conf ['current'], newconf)) + same_file = 0 == len(myoutput) + if mystatus >> 8 == 2: + # Binary files differ + same_cvs = False + same_wsc = False + else: + same_cvs = 0 == len(commands.getoutput( + DIFF_CVS_INTERP % (conf ['current'], newconf))) + same_wsc = 0 == len(commands.getoutput( + DIFF_WSCOMMENTS % (conf ['current'], newconf))) # Do options permit? same_cvs = same_cvs and self.options['replace-cvs'] == 'yes' diff --git a/tabcheck.py b/tabcheck.py index ae9f28960..c45b74873 100755 --- a/tabcheck.py +++ b/tabcheck.py @@ -3,5 +3,5 @@ import tabnanny,sys for x in sys.argv: -# print "Tabchecking " + x + print "Tabchecking " + x tabnanny.check(x) -- 2.26.2