df34d48d0a831687d74c3ab4d1b7e65e4b484045 max Fri Jun 27 08:34:09 2025 -0700 fix for last commit diff --git ucsc/datasetDiffs ucsc/datasetDiffs index ff04dc9..2605692 100755 --- ucsc/datasetDiffs +++ ucsc/datasetDiffs @@ -145,34 +145,34 @@ for dname in cb_datasets: cb_loc[dname] = cb_base + dname + "/dataset.json" threader(cb_loc, cb_djson, cb_hide) # dicts/sets to hold everything rr_hide = set() # holds hidden rr datasets rr_djson = dict() # holds contents of json files for each rr dataset rr_datasets = set() # holds names of all datasets on rr rr_paths = dict() # file paths to process via multithreading # Get list of dataset.json files for rr cmd = ['ssh', 'qateam@hgw0.soe.ucsc.edu', 'find', ct_base, '-name',\ 'dataset.json', '|', 'cut', '-f', '6-', '-d', '"/"'] p = Popen(cmd, shell=False, stdout=PIPE, stderr=PIPE) cmdout, cmderr = p.communicate() rr_files = set(cmdout.decode().rstrip().split('\n')) - with tempfile.NamedTemporaryFile(prefix='cb_', delete=False) as tmp: + tmp = tempfile.NamedTemporaryFile(prefix='cb_', delete=False): tmp.write(cmdout) #tmp = open("/data/tmp/filesForRsync.txt", "wb") - tmp.write(cmdout) + #tmp.write(cmdout) tmp.flush() # Wanted to use TemporaryDirectory here but couldn't get it to work rr_base = '/data/tmp/cb_tmp_new' # Make the new directory, continue on if dir already exists try: mkdir(rr_base) except OSError: pass rsync_cmd = ['rsync', '--files-from=' + tmp.name, \ 'qateam@hgw0.soe.ucsc.edu:/usr/local/apache/htdocs-cells/', rr_base] print("running ", rsync_cmd) #rsync_p = Popen(rsync_cmd, shell=True, stdout=PIPE, stderr=PIPE) #rsync_cmdout, rsync_cmderr = p.communicate() subprocess.run(rsync_cmd, check=True)