Skip to content

Commit

Permalink
Fix bug. Show progress in scp'ing
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarcote committed Dec 19, 2022
1 parent bb25a83 commit 342707f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion evn_postprocess/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def scp(originpath, destpath):
"""
print("\n\033[1m> " + f"scp {originpath} {destpath}" + "\033[0m")
process = subprocess.call(["scp", originpath, destpath], shell=False,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout=None, stderr=subprocess.PIPE)
if process != 0:
raise ValueError(f"\nError code {process} when running scp {originpath} {destpath} in ccs.")

Expand Down
8 changes: 4 additions & 4 deletions evn_postprocess/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,9 @@ def keyfile(self):
keyfilepath = self.cwd / f"{self.expname.lower()}.key"
if not keyfilepath.exists():
env.scp(f"[email protected]:vlbi_arch/" \
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}" + r"\*" + ".key", ".")
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}.key", ".")
self.log(f"scp [email protected]:vlbi_arch/" \
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}" + r"\*" + ".key .")
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}.key .")

return keyfilepath

Expand All @@ -1004,9 +1004,9 @@ def sumfile(self):
keyfilepath = self.cwd / f"{self.expname.lower()}.sum"
if not keyfilepath.exists():
env.scp(f"[email protected]:vlbi_arch/" \
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}" + r"\*" + ".sum", ".")
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}.sum", ".")
self.log(f"scp [email protected]:vlbi_arch/" \
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}" + r"\*" + ".sum .")
f"{self.obsdatetime.strftime('%b%y').lower()}/{self.expname.lower()}.sum .")

return keyfilepath

Expand Down

0 comments on commit 342707f

Please sign in to comment.