From a50e44413a6e3584a4929593eefea192304b7643 Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Thu, 6 Aug 2015 11:01:17 -0400 Subject: [PATCH] Remove unnecessarily created globals --- build.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build.py b/build.py index 0f41131..61083cb 100644 --- a/build.py +++ b/build.py @@ -7,16 +7,14 @@ from argparse import ArgumentParser -# Initialize -try: - token = os.environ['ANACONDA_TOKEN'] -except KeyError: - sys.exit("Must set $ANACONDA_TOKEN") -anaconda = sh.Command('anaconda').bake(t=token) -conda = sh.Command('conda') - - def build_and_publish(path, channel): + try: + token = os.environ['ANACONDA_TOKEN'] + except KeyError: + sys.exit("Must set $ANACONDA_TOKEN") + anaconda = sh.Command('anaconda').bake(t=token) + conda = sh.Command('conda') + binfile = conda.build("--output", path).strip() print "Building..." conda.build(path)