Skip to content

Commit

Permalink
bug2 chgcar on server
Browse files Browse the repository at this point in the history
  • Loading branch information
dimonaks committed Jul 5, 2018
1 parent 1a51671 commit 1564f00
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,14 +781,24 @@ def wrapper_cp_on_server(file, to, new_filename = None):

copy_file = file

filename = os.path.basename(file)
if new_filename:
app = 'with new name '+new_filename
else:
app = ''

for s, gz in product([0,1], ['', '.gz']):

printlog('scratch, gz:', s, gz)

out = server_cp(copy_file+gz, to = to, gz = gz, scratch = s, new_filename = new_filename)

if out == '':
printlog('Succesfully copied', imp = 'y')
printlog('File', filename, 'was succesfully copied to',to, app, imp = 'y')
break
# else:
else:
printlog('Warning! File was not copied, probably it does not exist. Try using header.warnings = "neyY" for more details', imp = 'y')


return

0 comments on commit 1564f00

Please sign in to comment.