Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmans committed Nov 6, 2024
1 parent 6b6002c commit ab2cd4d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions carthage/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def filter_dependencies(k):

def setup_task_event_keys(self):
return self.supplementary_injection_keys(InjectionKey(Machine, host=self.name))

async def start_machine(self):

'''
Expand Down Expand Up @@ -618,7 +618,7 @@ def run_command(self,
This method is the machine-specific part of :meth:`run_command`. Override in subclasses if there is a better way to run a command than sshing into a machine. This method is async, although that is not reflected in the signature because this implementation returns an awaitable.
:param user: The user to run as. defaults to :attr:`runas_user`.
This implementation calls :meth:`ssh`.
Ssh has really bad quoting; it effectively removes one level of quoting from the input.
This handles quoting and makes sure each argument is a separate argument on the eventual shell;
Expand All @@ -633,7 +633,7 @@ def run_command(self,
shlex.join(args),
_bg=_bg, _bg_exc=_bg_exc)


async def sshfs_process_factory(self, user):
if user != self.ssh_login_user:
raise ValueError(f'{self.__class__.__qualname__} cannot set up filesystem access when runas_user != ssh_login_user')
Expand Down Expand Up @@ -760,7 +760,7 @@ def delete_stamp(self, stamp):
def inspect_setup_tasks(self):
return super().inspect_setup_tasks(
stamp_stem=self.stamp_stem+'-', instance_id=id(self.host))

async def last_run(self):
'''
:return: the most recent time any setup task on this Customization has run against the given host. Returns false if the tasks definitely need to run.
Expand Down Expand Up @@ -799,7 +799,7 @@ def run_command(self, *args, _user=None, **kwargs):
return self.host.run_command(
*args, _user=_user,
**kwargs)


class MachineCustomization(BaseCustomization):

Expand Down Expand Up @@ -859,7 +859,7 @@ def __init__(self, obj, stamp):

def check_stamp(self, s, *args):
return self.obj.check_stamp(self.stamp_stem+'-'+s, *args)


@property
def logger_for(self):
Expand All @@ -871,7 +871,7 @@ def stamp_path(self):

def __repr__(self):
return f'CustomizationInspectorProxy({repr(self.obj)})'

class CustomizationWrapper(TaskWrapperBase):

customization: typing.Type[BaseCustomization]
Expand Down Expand Up @@ -916,7 +916,7 @@ def inspect(self, obj, instance_id=None):
prev_inspector.stamp = self.stamp+'-'+prev_inspector.stamp
prev_inspector.instance_id = instance_id
yield prev_inspector


def customization_task(c: BaseCustomization, order: int = None,
before=None):
Expand All @@ -942,7 +942,7 @@ class BareMetalMachine(Machine, SetupTaskMixin, AsyncInjectable):

running = False
readonly = True #: Cannot be deleted or created.


async def start_machine(self):
if self.running:
Expand All @@ -968,7 +968,7 @@ async def find(self):
See if the machine exists. Override if it is desirable to do a dns check or similar.
'''
return True

@memoproperty
def stamp_path(self):
return Path(f'{self.config_layout.state_dir}/machines/{self.name}')
Expand Down

0 comments on commit ab2cd4d

Please sign in to comment.