aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader
diff options
context:
space:
mode:
authorPjotr Prins2020-04-13 10:49:12 -0500
committerPjotr Prins2020-04-13 10:49:12 -0500
commit58b36260d44ff522ea6c62e996d3c3bd886de03a (patch)
tree31362871ff994c71542da3fe2117b0854d140b38 /bh20simplewebuploader
parentd6218528d1c4497679570b5e7f4feac51d1f9c53 (diff)
downloadbh20-seq-resource-58b36260d44ff522ea6c62e996d3c3bd886de03a.tar.gz
bh20-seq-resource-58b36260d44ff522ea6c62e996d3c3bd886de03a.tar.lz
bh20-seq-resource-58b36260d44ff522ea6c62e996d3c3bd886de03a.zip
More testing and output
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r--bh20simplewebuploader/main.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index 693e4fd..f5324a5 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -10,6 +10,11 @@ import yaml
import urllib.request
from flask import Flask, request, redirect, send_file, send_from_directory, render_template
+import os.path
+
+if not os.path.isfile('bh20sequploader/mainx.py'):
+ print("WARNING: run FLASK from the root of the source repository!", file=sys.stderr)
+
app = Flask(__name__, static_url_path='/static', static_folder='static')
# Limit file upload size. We shouldn't be working with anything over 1 MB; these are small genomes.
@@ -252,7 +257,9 @@ def receive_files():
# Try and upload files to Arvados using the sequence uploader CLI
- result = subprocess.run(['python3','bh20sequploader/main.py', fasta_dest, metadata_dest],
+ cmd = ['python3','bh20sequploader/main.py', fasta_dest, metadata_dest]
+ print(" ".join(cmd),file=sys.stderr)
+ result = subprocess.run(cmd,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0: