Skip to content

Commit

Permalink
ENH: Remove path.py as its not a dependency
Browse files Browse the repository at this point in the history
MAINT: Add try finally block to deal with exceptions
  • Loading branch information
buinvest committed Mar 27, 2017
1 parent 43d6004 commit 721de2a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import print_function
from contextlib import contextmanager
from glob import glob
from path import path
import os
from os.path import abspath, basename, dirname, exists, isfile
from shutil import move, rmtree
Expand Down Expand Up @@ -32,8 +31,11 @@ def ensure_not_exists(path):


def main():
old_dir = os.getcwd()
print("Moving to %s." % HERE)
with path(HERE):
os.chdir(HERE)

try:
print("Building docs with 'make html'")
check_call(['make', 'html'])

Expand Down Expand Up @@ -64,6 +66,8 @@ def main():
print("%s -> %s" % (file_, base))
ensure_not_exists(base)
move(file_, '.')
finally:
os.chdir(old_dir)

print()
print("Updated documentation branch in directory %s" % ZIPLINE_ROOT)
Expand Down

0 comments on commit 721de2a

Please sign in to comment.