aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-19 09:54:55 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2016-01-19 09:54:55 -0500
commitd3a5aa4cdd022e0fc336b66177b9eee7c2675485 (patch)
tree2364b4774575b9225c4e4a8b893c4d06ef3fb32e
parent00d39669e458ed28b10bf9c6f54de6504f46d550 (diff)
downloaddotfiles-d3a5aa4cdd022e0fc336b66177b9eee7c2675485.tar.gz
dotfiles-d3a5aa4cdd022e0fc336b66177b9eee7c2675485.tar.bz2
dotfiles-d3a5aa4cdd022e0fc336b66177b9eee7c2675485.zip
Update function organization in dotfile.py
-rw-r--r--dotfiles/dotfile.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/dotfiles/dotfile.py b/dotfiles/dotfile.py
index ce17378..7762abb 100644
--- a/dotfiles/dotfile.py
+++ b/dotfiles/dotfile.py
@@ -23,12 +23,6 @@ class Dotfile(object):
def __repr__(self):
return '<Dotfile %r>' % self.name
- def _link(self, debug):
- if debug:
- echo('LINK %s -> %s' % (self.name, self.target))
- else:
- self.name.mksymlinkto(self.target, absolute=0)
-
def _ensure_dirs(self, debug):
def ensure(dir, debug):
if not dir.check():
@@ -39,6 +33,12 @@ class Dotfile(object):
ensure(py.path.local(self.name.dirname), debug)
ensure(py.path.local(self.target.dirname), debug)
+ def _link(self, debug):
+ if debug:
+ echo('LINK %s -> %s' % (self.name, self.target))
+ else:
+ self.name.mksymlinkto(self.target, absolute=0)
+
def _unlink(self, debug):
if debug:
echo('UNLINK %s' % self.name)