mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
flake8
This commit is contained in:
@@ -8,7 +8,6 @@ from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import yaml
|
||||
import logging
|
||||
import requests
|
||||
@@ -53,7 +52,7 @@ def main(argv):
|
||||
# so now we can know which to send.
|
||||
local_reports = [x.strip('.json') for x in os.listdir(REPORT_DIR) if x.endswith('.json')]
|
||||
for report_id in local_reports:
|
||||
if not report_id in remote_reports:
|
||||
if report_id not in remote_reports:
|
||||
print("Uploading %s" % report_id)
|
||||
files = {
|
||||
'meta': open(os.path.join(sys.argv[1], report_id + '.json'), 'rb'),
|
||||
|
||||
+7
-8
@@ -117,8 +117,8 @@ class Sanitization:
|
||||
if data['src'] == 'hda':
|
||||
try:
|
||||
dataset = self.sa_session.query(self.model.Dataset.id, self.model.Dataset.total_size) \
|
||||
.filter_by(id=data['id']) \
|
||||
.first()
|
||||
.filter_by(id=data['id']) \
|
||||
.first()
|
||||
if dataset and dataset[1]:
|
||||
data['size'] = int(dataset[1])
|
||||
else:
|
||||
@@ -132,7 +132,6 @@ class Sanitization:
|
||||
else:
|
||||
raise Exception("Cannot handle {src} yet".format(data))
|
||||
|
||||
|
||||
def _sanitize_dict(self, unsanitized_dict, path=""):
|
||||
# if it is a file dictionary, handle specially.
|
||||
if len(unsanitized_dict.keys()) == 2 and \
|
||||
@@ -268,15 +267,15 @@ def main(argv):
|
||||
.all():
|
||||
|
||||
# TODO: blacklisted
|
||||
handle_job.write(str(job[0])) # id
|
||||
handle_job.write(str(job[0])) # id
|
||||
handle_job.write('\t')
|
||||
handle_job.write(job[2]) # tool_id
|
||||
handle_job.write(job[2]) # tool_id
|
||||
handle_job.write('\t')
|
||||
handle_job.write(job[3]) # tool_version
|
||||
handle_job.write(job[3]) # tool_version
|
||||
handle_job.write('\t')
|
||||
handle_job.write(job[4]) # state
|
||||
handle_job.write(job[4]) # state
|
||||
handle_job.write('\t')
|
||||
handle_job.write(str(job[5])) # create_time
|
||||
handle_job.write(str(job[5])) # create_time
|
||||
handle_job.write('\n')
|
||||
# meta counts
|
||||
job_state_data[job[4]] += 1
|
||||
|
||||
Reference in New Issue
Block a user