Merge a7f24ef80e
into 0b01d56d81
This commit is contained in:
commit
4651eb4220
|
@ -89,8 +89,9 @@ class Link(dotbot.Plugin):
|
||||||
if not self._exists(parent):
|
if not self._exists(parent):
|
||||||
try:
|
try:
|
||||||
os.makedirs(parent)
|
os.makedirs(parent)
|
||||||
except OSError:
|
except OSError as err:
|
||||||
self._log.warning('Failed to create directory %s' % parent)
|
self._log.warning('Failed to create directory %s' % parent)
|
||||||
|
self._log.debug('Error: %s.' % err.strerror)
|
||||||
success = False
|
success = False
|
||||||
else:
|
else:
|
||||||
self._log.lowinfo('Creating directory %s' % parent)
|
self._log.lowinfo('Creating directory %s' % parent)
|
||||||
|
@ -116,8 +117,9 @@ class Link(dotbot.Plugin):
|
||||||
else:
|
else:
|
||||||
os.remove(fullpath)
|
os.remove(fullpath)
|
||||||
removed = True
|
removed = True
|
||||||
except OSError:
|
except OSError as err:
|
||||||
self._log.warning('Failed to remove %s' % path)
|
self._log.warning('Failed to remove %s' % path)
|
||||||
|
self._log.debug('Error: %s' % err.strerror)
|
||||||
success = False
|
success = False
|
||||||
else:
|
else:
|
||||||
if removed:
|
if removed:
|
||||||
|
@ -155,8 +157,9 @@ class Link(dotbot.Plugin):
|
||||||
elif not self._exists(link_name) and self._exists(absolute_source):
|
elif not self._exists(link_name) and self._exists(absolute_source):
|
||||||
try:
|
try:
|
||||||
os.symlink(source, destination)
|
os.symlink(source, destination)
|
||||||
except OSError:
|
except OSError as err:
|
||||||
self._log.warning('Linking failed %s -> %s' % (link_name, source))
|
self._log.warning('Linking failed %s -> %s' % (link_name, source))
|
||||||
|
self._log.debug('Error: %s' % err.strerror)
|
||||||
else:
|
else:
|
||||||
self._log.lowinfo('Creating link %s -> %s' % (link_name, source))
|
self._log.lowinfo('Creating link %s -> %s' % (link_name, source))
|
||||||
success = True
|
success = True
|
||||||
|
|
Loading…
Reference in a new issue