From 487a7f86b8299ac9a37ccbd253cb0ffb1f416cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 25 Nov 2007 13:53:54 +0000 Subject: [PATCH] kozmetik... --- pisi/actionsapi/autotools.py | 2 +- pisi/actionsapi/cmaketools.py | 2 +- pisi/actionsapi/get.py | 2 +- pisi/actionsapi/perlmodules.py | 2 +- pisi/actionsapi/pythonmodules.py | 10 +++++----- pisi/actionsapi/shelltools.py | 2 +- pisi/actionsapi/variables.py | 3 ++- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pisi/actionsapi/autotools.py b/pisi/actionsapi/autotools.py index 8b7ec62e..8fe15589 100644 --- a/pisi/actionsapi/autotools.py +++ b/pisi/actionsapi/autotools.py @@ -96,7 +96,7 @@ def make(parameters = ''): raise MakeError(_('Make failed.')) def fixInfoDir(): - infoDir = "%s/usr/share/info/dir" % get.installDIR() + infoDir = '%s/usr/share/info/dir' % get.installDIR() if can_access_file(infoDir): unlink(infoDir) diff --git a/pisi/actionsapi/cmaketools.py b/pisi/actionsapi/cmaketools.py index 375bf492..9f50ffdb 100644 --- a/pisi/actionsapi/cmaketools.py +++ b/pisi/actionsapi/cmaketools.py @@ -72,7 +72,7 @@ def make(parameters = ''): raise InstallError(_('No Makefile found.')) def fixInfoDir(): - infoDir = "%s/usr/share/info/dir" % get.installDIR() + infoDir = '%s/usr/share/info/dir' % get.installDIR() if can_access_file(infoDir): unlink(infoDir) diff --git a/pisi/actionsapi/get.py b/pisi/actionsapi/get.py index a9b54322..a9c1fb18 100644 --- a/pisi/actionsapi/get.py +++ b/pisi/actionsapi/get.py @@ -49,7 +49,7 @@ def curPYTHON(): def curPERL(): ''' returns currently used perl's version''' - return os.path.realpath("/usr/bin/perl").split("perl")[1] + return os.path.realpath('/usr/bin/perl').split('perl')[1] def ENV(environ): '''returns any given environ variable''' diff --git a/pisi/actionsapi/perlmodules.py b/pisi/actionsapi/perlmodules.py index e4f4483a..aa91c835 100644 --- a/pisi/actionsapi/perlmodules.py +++ b/pisi/actionsapi/perlmodules.py @@ -77,7 +77,7 @@ def install(parameters = 'install'): fixLocalPod() def fixLocalPod(): - podFiles = glob.glob("%s/usr/lib/*/*/*/perllocal.pod" % get.installDIR()) + podFiles = glob.glob('%s/usr/lib/*/*/*/perllocal.pod' % get.installDIR()) for podFile in podFiles: if can_access_file(podFile): diff --git a/pisi/actionsapi/pythonmodules.py b/pisi/actionsapi/pythonmodules.py index f50fc95a..0babdac6 100644 --- a/pisi/actionsapi/pythonmodules.py +++ b/pisi/actionsapi/pythonmodules.py @@ -65,10 +65,10 @@ def run(parameters = ''): if system('python %s' % (parameters)): raise RunTimeError, _('Running %s failed.') % parameters -def fixCompiledPy(lookInto = "/usr/lib/%s/" % get.curPYTHON()): +def fixCompiledPy(lookInto = '/usr/lib/%s/' % get.curPYTHON()): ''' cleans *.py[co] from packages ''' - for root, dirs, files in os.walk("%s/%s" % (get.installDIR(),lookInto)): + for root, dirs, files in os.walk('%s/%s' % (get.installDIR(),lookInto)): for compiledFile in files: - if compiledFile.endswith(".pyc") or compiledFile.endswith(".pyo"): - if can_access_file("%s/%s" % (root,compiledFile)): - unlink("%s/%s" % (root,compiledFile)) + if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'): + if can_access_file('%s/%s' % (root,compiledFile)): + unlink('%s/%s' % (root,compiledFile)) diff --git a/pisi/actionsapi/shelltools.py b/pisi/actionsapi/shelltools.py index 47784af8..5583bc46 100644 --- a/pisi/actionsapi/shelltools.py +++ b/pisi/actionsapi/shelltools.py @@ -68,7 +68,7 @@ def chmod(filePath, mode = 0755): else: ctx.ui.error(_('ActionsAPI [chmod]: File %s doesn\'t exists.') % (fileName)) -def chown(filePath, uid = "root", gid = "root"): +def chown(filePath, uid = 'root', gid = 'root'): '''change the owner and group id of filePath to uid and gid''' if can_access_file(filePath): try: diff --git a/pisi/actionsapi/variables.py b/pisi/actionsapi/variables.py index fcc17ff2..1a66210d 100644 --- a/pisi/actionsapi/variables.py +++ b/pisi/actionsapi/variables.py @@ -91,7 +91,8 @@ class Dirs: # because of uninitialized context (ctx) because of exportFlags(). # # We import this modue from build.py becase we need to reset/init glb -# for each build. # See bug #2575 +# for each build. +# See bug #2575 glb = None def initVariables():