Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library

directory.
This commit is contained in:
Michael DeHaan
2012-08-11 12:35:58 -04:00
parent 72faf8eb0a
commit 477ca2ed1a
13 changed files with 128 additions and 133 deletions

View File

@@ -59,8 +59,8 @@ def set_mount(**kwargs):
changed = False
for line in open(args['fstab'], 'r').readlines():
if not line.strip():
to_write.append(line)
continue
to_write.append(line)
continue
if line.strip().startswith('#'):
to_write.append(line)
continue
@@ -85,9 +85,9 @@ def set_mount(**kwargs):
ld[t] = args[t]
if changed:
to_write.append(new_line % ld)
to_write.append(new_line % ld)
else:
to_write.append(line)
to_write.append(line)
if not exists:
to_write.append(new_line % args)
@@ -115,8 +115,8 @@ def unset_mount(**kwargs):
changed = False
for line in open(args['fstab'], 'r').readlines():
if not line.strip():
to_write.append(line)
continue
to_write.append(line)
continue
if line.strip().startswith('#'):
to_write.append(line)
continue
@@ -147,9 +147,9 @@ def mount(**kwargs):
name = kwargs['name']
if os.path.ismount(name):
cmd = ['/bin/mount', '-o', 'remount', name]
cmd = [ '/bin/mount', '-o', 'remount', name ]
else:
cmd = ['/bin/mount', name ]
cmd = [ '/bin/mount', name ]
call = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = call.communicate()