Commit d1d4e084 authored by Julian Andres Klode's avatar Julian Andres Klode

Fix pep8 1.6.2 issues

parent 7f34874d
......@@ -125,11 +125,11 @@ class Distribution(object):
self.disabled_sources.append(source)
if (not source.invalid and
source.template in self.source_template.children):
if (not source.disabled
and source.type == self.binary_type):
if (not source.disabled and
source.type == self.binary_type):
self.child_sources.append(source)
elif (not source.disabled
and source.type == self.source_type):
elif (not source.disabled and
source.type == self.source_type):
self.source_code_sources.append(source)
else:
self.disabled_sources.append(source)
......
......@@ -377,8 +377,8 @@ class SourcesList(object):
if backup_ext is None:
backup_ext = time.strftime("%y%m%d.%H%M")
for source in self.list:
if (source.file not in already_backuped
and os.path.exists(source.file)):
if (source.file not in already_backuped and
os.path.exists(source.file)):
shutil.copy(source.file, "%s%s" % (source.file, backup_ext))
return backup_ext
......
......@@ -15,12 +15,14 @@ def format_mode(what, mode):
s_mode = dict(DIR="d", HARDLINK="h", FILE="-").get(what)
s_mode += ((mode & stat.S_IRUSR) and "r" or "-")
s_mode += ((mode & stat.S_IWUSR) and "w" or "-")
s_mode += ((mode & stat.S_IXUSR) and (mode & stat.S_ISUID and "s" or "x")
or (mode & stat.S_ISUID and "S" or "-"))
s_mode += ((mode & stat.S_IXUSR) and
(mode & stat.S_ISUID and "s" or "x") or
(mode & stat.S_ISUID and "S" or "-"))
s_mode += ((mode & stat.S_IRGRP) and "r" or "-")
s_mode += ((mode & stat.S_IWGRP) and "w" or "-")
s_mode += ((mode & stat.S_IXGRP) and (mode & stat.S_ISGID and "s" or "x")
or (mode & stat.S_ISGID and "S" or "-"))
s_mode += ((mode & stat.S_IXGRP) and
(mode & stat.S_ISGID and "s" or "x") or
(mode & stat.S_ISGID and "S" or "-"))
s_mode += ((mode & stat.S_IROTH) and "r" or "-")
s_mode += ((mode & stat.S_IWOTH) and "w" or "-")
s_mode += ((mode & stat.S_IXOTH) and "x" or "-")
......
......@@ -19,7 +19,8 @@ class PackagePep8TestCase(unittest.TestCase):
# E129 continuation line does not distinguish itself from
# next logical line
# E265 block comment should start with '# '
"--ignore=E125,E126,E127,E128,E129,E265",
# E402 module level import not at top of file (breaks tests)
"--ignore=E125,E126,E127,E128,E129,E265,E402",
"--exclude", "build,tests/old",
"--repeat", py_dir])
if res != 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment