aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-02-05 09:22:23 -0800
committerBrian Dolbec <dolsen@gentoo.org>2015-02-07 12:48:38 -0800
commit33be1c1e3e55d17e601bbe1f30e08582b9419e5e (patch)
treea354eab9d5d9c0464e84d12acf24394e77e2ba80
parentRemove bad link preventing sdist from running (diff)
downloadlayman-33be1c1e3e55d17e601bbe1f30e08582b9419e5e.tar.gz
layman-33be1c1e3e55d17e601bbe1f30e08582b9419e5e.tar.bz2
layman-33be1c1e3e55d17e601bbe1f30e08582b9419e5e.zip
Pyflakes import and whitespace cleanup
-rw-r--r--etc/layman.cfg2
-rw-r--r--layman/overlays/modules/bzr/bzr.py4
-rw-r--r--layman/overlays/modules/cvs/cvs.py15
-rw-r--r--layman/overlays/modules/git/git.py4
-rw-r--r--layman/overlays/modules/mercurial/mercurial.py3
-rw-r--r--layman/overlays/modules/squashfs/squashfs.py2
-rw-r--r--layman/overlays/modules/svn/svn.py3
-rw-r--r--layman/overlays/modules/tar/tar.py1
8 files changed, 13 insertions, 21 deletions
diff --git a/etc/layman.cfg b/etc/layman.cfg
index 2a8eabf..2aa7dd7 100644
--- a/etc/layman.cfg
+++ b/etc/layman.cfg
@@ -58,7 +58,7 @@ repos_conf : /etc/portage/repos.conf/layman.conf
auto_sync : Yes
#-----------------------------------------------------------
-# Repository config types used by layman
+# Repository config types used by layman
# (repos.conf, make.conf)
conf_type : repos.conf
diff --git a/layman/overlays/modules/bzr/bzr.py b/layman/overlays/modules/bzr/bzr.py
index 03b0730..75163c6 100644
--- a/layman/overlays/modules/bzr/bzr.py
+++ b/layman/overlays/modules/bzr/bzr.py
@@ -58,7 +58,7 @@ class BzrOverlay(OverlaySource):
if source.endswith("/"):
return source
return source + '/'
-
+
def add(self, base):
'''Add overlay.'''
@@ -82,7 +82,7 @@ class BzrOverlay(OverlaySource):
def update(self, base, src):
'''
Updates overlay src-url.
-
+
@params base: base location where all overlays are installed.
@params src: source URL.
'''
diff --git a/layman/overlays/modules/cvs/cvs.py b/layman/overlays/modules/cvs/cvs.py
index 3dc6469..7c558ae 100644
--- a/layman/overlays/modules/cvs/cvs.py
+++ b/layman/overlays/modules/cvs/cvs.py
@@ -26,7 +26,6 @@ __version__ = "$Id$"
#
#-------------------------------------------------------------------------------
-import xml.etree.ElementTree as ET # Python 2.5
import re
from layman.utils import path, run_command
@@ -78,16 +77,16 @@ class CvsOverlay(OverlaySource):
def update(self, base, src):
'''
Updates overlay src-url.
-
+
@params base: base location where all overlays are installed.
@params src: source URL.
'''
-
+
if not self.supported():
return 1
target = path([base, self.parent.name])
-
+
# First echo the new repository to CVS/Root
args = [src, '>', '/CVS/Root']
result = run_command(self.config, 'echo', args, cmd='echo',
@@ -96,12 +95,12 @@ class CvsOverlay(OverlaySource):
if result == 0:
location = src.split(':')[3]
old_location = self.src.split(':/')[3]
-
+
# Check if the repository location needs to be updated too.
if not location == old_location:
location = re.sub('/', '\/', location)
old_location = re.sub('/', '\/', old_location)
-
+
expression = 's/' + old_location + '/' + location + '/'
# sed -i 's/<old_location>/<new_location>/ <target>/CVS/Repository
@@ -110,8 +109,8 @@ class CvsOverlay(OverlaySource):
return run_command(self.config, 'sed', args, cmd='sed',
cwd=target)
- return result
-
+ return result
+
def sync(self, base):
'''Sync overlay.'''
diff --git a/layman/overlays/modules/git/git.py b/layman/overlays/modules/git/git.py
index 228c2af..341e4e6 100644
--- a/layman/overlays/modules/git/git.py
+++ b/layman/overlays/modules/git/git.py
@@ -26,8 +26,6 @@ __version__ = "$Id: git.py 146 2006-05-27 09:52:36Z wrobel $"
#
#-------------------------------------------------------------------------------
-import xml.etree.ElementTree as ET
-
from layman.utils import path, run_command
from layman.overlays.source import OverlaySource, require_supported
@@ -110,7 +108,7 @@ class GitOverlay(OverlaySource):
def update(self, base, src):
'''
Update overlay src-url
-
+
@params base: base location where all overlays are installed.
@params src: source URL.
'''
diff --git a/layman/overlays/modules/mercurial/mercurial.py b/layman/overlays/modules/mercurial/mercurial.py
index 0b5e7e5..b104936 100644
--- a/layman/overlays/modules/mercurial/mercurial.py
+++ b/layman/overlays/modules/mercurial/mercurial.py
@@ -28,7 +28,6 @@ __version__ = "$Id: mercurial.py 236 2006-09-05 20:39:37Z wrobel $"
#-------------------------------------------------------------------------------
import re
-import xml.etree.ElementTree as ET
from layman.utils import path, run_command
from layman.overlays.source import OverlaySource, require_supported
@@ -91,7 +90,7 @@ class MercurialOverlay(OverlaySource):
def update(self, base, src):
'''
Updates overlay src-url.
-
+
@params base: base location where all overlays are installed.
@params src: source URL.
'''
diff --git a/layman/overlays/modules/squashfs/squashfs.py b/layman/overlays/modules/squashfs/squashfs.py
index d0f3464..58c69f5 100644
--- a/layman/overlays/modules/squashfs/squashfs.py
+++ b/layman/overlays/modules/squashfs/squashfs.py
@@ -26,11 +26,9 @@ from __future__ import unicode_literals
import os
import shutil
-import sys
from layman.constants import FILE_EXTENSIONS
from layman.overlays.archive import ArchiveOverlay
-from layman.overlays.source import require_supported
from layman.utils import path
#===============================================================================
diff --git a/layman/overlays/modules/svn/svn.py b/layman/overlays/modules/svn/svn.py
index fff8805..c9b4c45 100644
--- a/layman/overlays/modules/svn/svn.py
+++ b/layman/overlays/modules/svn/svn.py
@@ -21,7 +21,6 @@ from __future__ import unicode_literals
__version__ = "$Id: svn.py 236 2006-09-05 20:39:37Z wrobel $"
-import os
import sys
from subprocess import PIPE, Popen
@@ -93,7 +92,7 @@ class SvnOverlay(OverlaySource):
def update(self, base, src):
'''
Update overlay src-url
-
+
@params base: base location where all overlays are installed.
@params src: source URL.
'''
diff --git a/layman/overlays/modules/tar/tar.py b/layman/overlays/modules/tar/tar.py
index 7be11de..9c0f0f3 100644
--- a/layman/overlays/modules/tar/tar.py
+++ b/layman/overlays/modules/tar/tar.py
@@ -26,7 +26,6 @@ __version__ = "$Id: tar.py 310 2007-04-09 16:30:40Z wrobel $"
#
#-------------------------------------------------------------------------------
-import sys
from layman.constants import FILE_EXTENSIONS
from layman.overlays.archive import ArchiveOverlay