Commit d3e7de70 authored by Marco Mariani's avatar Marco Mariani

typos

parent 9fc3f60f
...@@ -32,25 +32,26 @@ import os ...@@ -32,25 +32,26 @@ import os
import shutil import shutil
import subprocess import subprocess
import pkg_resources import pkg_resources
import pwd
import stat import stat
import tarfile
import tempfile import tempfile
from supervisor import xmlrpc
import xmlrpclib
import pwd
import utils import utils
import xmlrpclib
from supervisor import xmlrpc
from slapos.slap.slap import NotFoundError from slapos.slap.slap import NotFoundError
from svcbackend import getSupervisorRPC from svcbackend import getSupervisorRPC
from exception import BuildoutFailedError, WrongPermissionError, \ from exception import BuildoutFailedError, WrongPermissionError, \
PathDoesNotExistError PathDoesNotExistError
from networkcache import download_network_cached, upload_network_cached from networkcache import download_network_cached, upload_network_cached
import tarfile
from watchdog import getWatchdogID from watchdog import getWatchdogID
REQUIRED_COMPUTER_PARTITION_PERMISSION = '0750' REQUIRED_COMPUTER_PARTITION_PERMISSION = '0750'
class Software(object): class Software(object):
"""This class is responsible of installing a software release""" """This class is responsible for installing a software release"""
def __init__(self, url, software_root, buildout, def __init__(self, url, software_root, buildout,
signature_private_key_file=None, signature_certificate_list=None, signature_private_key_file=None, signature_certificate_list=None,
upload_cache_url=None, upload_dir_url=None, shacache_cert_file=None, upload_cache_url=None, upload_dir_url=None, shacache_cert_file=None,
...@@ -201,7 +202,7 @@ class Software(object): ...@@ -201,7 +202,7 @@ class Software(object):
def destroy(self): def destroy(self):
"""Removes software release.""" """Removes software release."""
def retry(func, path, exc): def retry(func, path, exc):
# inspired on slapos.buildout hard remover # inspired by slapos.buildout hard remover
if func == os.path.islink: if func == os.path.islink:
os.unlink(path) os.unlink(path)
else: else:
...@@ -299,7 +300,7 @@ class Partition(object): ...@@ -299,7 +300,7 @@ class Partition(object):
instance_path=self.instance_path, instance_path=self.instance_path,
user_id=uid, user_id=uid,
group_id=gid, group_id=gid,
# As supervisord has no environment to inherit setup minimalistic one # As supervisord has no environment to inherit, setup a minimalistic one
HOME=pwd.getpwuid(uid).pw_dir, HOME=pwd.getpwuid(uid).pw_dir,
USER=pwd.getpwuid(uid).pw_name, USER=pwd.getpwuid(uid).pw_name,
) )
...@@ -383,7 +384,7 @@ class Partition(object): ...@@ -383,7 +384,7 @@ class Partition(object):
buildout_binary) buildout_binary)
else: else:
if len(bootstrap_candidate_list) != 1: if len(bootstrap_candidate_list) != 1:
raise ValueError('More then one bootstrap candidate found.') raise ValueError('More than one bootstrap candidate found.')
# Reads uid/gid of path, launches buildout with thoses privileges # Reads uid/gid of path, launches buildout with thoses privileges
bootstrap_file = os.path.abspath(os.path.join(bootstrap_candidate_dir, bootstrap_file = os.path.abspath(os.path.join(bootstrap_candidate_dir,
bootstrap_candidate_list[0])) bootstrap_candidate_list[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