From c8ba3ceb72ee2abf8c56b584142e062b5a364167 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 8 Feb 2011 20:34:18 +0100 Subject: [PATCH] Dependencies update --- CouchPotato.py | 21 +++++++++++---------- libs | 2 +- src/couchpotato/cli.py | 11 +++++++++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CouchPotato.py b/CouchPotato.py index 2e782803..b4a56b20 100755 --- a/CouchPotato.py +++ b/CouchPotato.py @@ -16,35 +16,36 @@ except ImportError: cwd = dirname(__file__) print "Updating libraries..." stdout, stderr = subprocess.Popen(["git", "submodule", "init"], - stderr=subprocess.PIPE, - stdout=subprocess.PIPE).communicate() + stderr = subprocess.PIPE, + stdout = subprocess.PIPE).communicate() if stderr: print "[WARNING] Git is complaining:" - print "="*78 + print "=" * 78 print stderr - print "="*78 + print "=" * 78 stdout, stderr = subprocess.Popen(["git", "submodule", "update"], - stderr=subprocess.PIPE, - stdout=subprocess.PIPE).communicate() + stderr = subprocess.PIPE, + stdout = subprocess.PIPE).communicate() if stderr: print "[WARNING] Git is complaining:" - print "="*78 + print "=" * 78 print stderr - print "="*78 + print "=" * 78 print "Registering libraries..." # Insert local directories into path lib_path = os.path.join(os.path.abspath(cwd), 'libs') src_path = os.path.join(os.path.abspath(cwd), 'src') sys.path.insert(0, lib_path) sys.path.insert(0, src_path) + print sys.path print "Passing execution to couchpotato..." try: from couchpotato import cli except ImportError: print "[ERROR]: Something's seriously wrong." - print "="*78 + print "=" * 78 traceback.print_exc() - print "="*78 + print "=" * 78 print "Aborting..." sys.exit(1) else: diff --git a/libs b/libs index e0c64383..7c5fa9a7 160000 --- a/libs +++ b/libs @@ -1 +1 @@ -Subproject commit e0c643837486d10230460309ef2547ff0d144852 +Subproject commit 7c5fa9a7304a21198c2212cd9be5a9f321b0a204 diff --git a/src/couchpotato/cli.py b/src/couchpotato/cli.py index 084eda6b..d34cd37d 100644 --- a/src/couchpotato/cli.py +++ b/src/couchpotato/cli.py @@ -1,5 +1,12 @@ +from flask import Flask import argparse def cmd_couchpotato(): - print "Couchpotato." - pass + app = Flask(__name__) + + @app.route("/") + def hello(): + return "Hello World!" + + if __name__ == "__main__": + app.run(debug = True)