Merge 8a4e8392fb
into 53c26ba9e6
This commit is contained in:
commit
f0b205b400
|
@ -1,3 +1,5 @@
|
||||||
|
import os
|
||||||
|
import socket
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from .config import ConfigReader, ReadingError
|
from .config import ConfigReader, ReadingError
|
||||||
from .dispatcher import Dispatcher, DispatchError
|
from .dispatcher import Dispatcher, DispatchError
|
||||||
|
@ -24,6 +26,8 @@ def read_config(config_file):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
log = Messenger()
|
log = Messenger()
|
||||||
|
|
||||||
|
os.environ.setdefault("HOSTNAME", socket.gethostname())
|
||||||
try:
|
try:
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
add_options(parser)
|
add_options(parser)
|
||||||
|
|
|
@ -107,7 +107,7 @@ class Linker(Executor):
|
||||||
Returns true if successfully linked files.
|
Returns true if successfully linked files.
|
||||||
'''
|
'''
|
||||||
success = False
|
success = False
|
||||||
source = os.path.join(self._base_directory, source)
|
source = os.path.expandvars(os.path.join(self._base_directory, source))
|
||||||
if (not self._exists(link_name) and self._is_link(link_name) and
|
if (not self._exists(link_name) and self._is_link(link_name) and
|
||||||
self._link_destination(link_name) != source):
|
self._link_destination(link_name) != source):
|
||||||
self._log.warning('Invalid link %s -> %s' %
|
self._log.warning('Invalid link %s -> %s' %
|
||||||
|
|
Loading…
Reference in a new issue