Permalink
Browse files

pep8 complains resolved

  • Loading branch information...
1 parent 7a92f8c commit b9ac81a29637dfbf10d4a5163002250d1e7cc3bc Michael Contento committed Nov 10, 2012
@@ -5,7 +5,7 @@
from functools import wraps
from fabric.decorators import (task, hosts, roles, runs_once, serial,
- parallel, with_settings)
+ parallel, with_settings)
from fabric.network import needs_host
from revolver.core import env
View
@@ -2,9 +2,9 @@
from __future__ import absolute_import, division, with_statement
-from cuisine import package_ensure as ensure
+from cuisine import package_ensure as ensure
from cuisine import package_install as install
-from cuisine import package_update as update
+from cuisine import package_update as update
from cuisine import package_upgrade as upgrade
from revolver import contextmanager as ctx
View
@@ -98,7 +98,7 @@ def _upload(self):
def _cleanup(self):
with ctx.cd(self.folders["releases"]):
core.run("ls -1 | sort -V | head -n-%s | xargs -l1 rm -rf"
- % self.releases_to_keep)
+ % self.releases_to_keep)
def _activate(self):
file.link(self.folders["releases.current"], self.folders["current"])
@@ -19,7 +19,7 @@ def test_revolver_is_just_a_wrapper():
def test_environment_default_values():
assert not core.env.sudo_forced
- assert core.env.sudo_user == None
+ assert core.env.sudo_user is None
def test_patch_fabric_api():
@@ -55,7 +55,7 @@ def _sudo_dummy(sudo=None):
def test_sudo_dummy():
- assert _sudo_dummy() == None
+ assert _sudo_dummy() is None
assert _sudo_dummy(True)
assert not _sudo_dummy(False)
@@ -75,7 +75,7 @@ def _use_sudo_dummy(use_sudo=None):
def test_sudo_dummy():
- assert _use_sudo_dummy() == None
+ assert _use_sudo_dummy() is None
assert _use_sudo_dummy(True)
assert not _use_sudo_dummy(False)
@@ -94,6 +94,6 @@ def test_sudo():
# TODO Properly mock/assert the used context
def checker():
assert core.env.sudo_forced
- assert core.env.sudo_user == None
+ assert core.env.sudo_user is None
decorator.sudo(checker)()
@@ -39,10 +39,10 @@ def test_command_upstart(sudo, exists):
def test_command_initd(sudo, exists):
(exists
.expects_call()
- .returns(False)
+ .returns(False)
.next_call()
- .with_args("/etc/init.d/foo")
- .returns(True))
+ .with_args("/etc/init.d/foo")
+ .returns(True))
sudo.expects_call().with_args("/etc/init.d/foo method")
service.command("foo", "method")
View
@@ -18,7 +18,7 @@ def _get_with_abort(username):
def exists(username):
- if get(username) == None:
+ if get(username) is None:
return False
return True
View
@@ -18,7 +18,7 @@ def is_running():
command = "vagrant status | egrep -o 'running$'"
vm_running = core.local(command, capture=True)
- if vm_running == None or vm_running == "":
+ if vm_running is None or vm_running == "":
return False
return True

0 comments on commit b9ac81a

Please sign in to comment.