def make_workspace(self, home): if path_exists(home): if not is_owner(home): abort('workspace already exists and does not belong to you, \ make sure you want to reinstall the project:%s' % home) else: with settings(hide('warnings'), warn_only=True): if not sudo('mkdir %s' % home).failed: sudo('chown %s %s' % (myenv.owner, home))