pnbp

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8e2561a2f5fdc616419b809f20c0d90b0088601a
parent 1d874222049b6546df0399463ebebb059d924f08
Author: Paul Longtine <paullongtine@gmail.com>
Date:   Thu Aug 28 20:30:21 2014

did the thing to make it work

Diffstat:
 src/core.py |  6 +++++-
 src/main.py | 21 +++++++--------------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/core.py b/src/core.py @@ -12,6 +12,7 @@ import os, sys, json, yaml, re import module from buildsite import * from functions import * +from initbasic import * #Global variables @@ -28,7 +29,10 @@ def cli(args): bd = i elif i == "-d": - os.chdir(args.pop(args.index(i)+1)) + try: + os.chdir(args.pop(args.index(i)+1)) + except: + pass elif i == "--help": print("Usage: build [OPTION(s)]... [DIR]...\n" diff --git a/src/main.py b/src/main.py @@ -6,25 +6,18 @@ ' ' For documentation, please visit http://static.nanner.co/pnbp ''' -import os, sys, traceback, time, core -from initbasic import * +import sys +from time import time +from core import build if __name__ == "__main__": #Save the time for the caluation - start = time.time() + start = time() #Try to build the site - try: - core.build(sys.argv) + build(sys.argv) - except: - print("Something went wrong...") - - traceback.print_exc(file=sys.stdout) - - sys.exit() - - #Print the time it took for the calculation - print("Finished in {} ms.".format((time.time()-start)*1000)) + #Print the time it took to build the site + print("Finished in {} ms.".format((time()-start)*1000))