Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Use shutil.move for cross-device file renaming #116

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions HinetPy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from datetime import datetime, timedelta
from html.parser import HTMLParser
from multiprocessing.pool import ThreadPool
import shutil

import requests
from requests.adapters import HTTPAdapter
Expand Down Expand Up @@ -524,8 +525,8 @@ def get_continuous_waveform( # noqa: PLR0915, PLR0912
ctable = os.path.join(dirname, ctable)
if dirname and not os.path.exists(dirname):
os.makedirs(dirname, exist_ok=True)
os.rename(ch_euc, ctable)

#os.rename(ch_euc, ctable)
seisman marked this conversation as resolved.
Show resolved Hide resolved
shutil.move(ch_euc, ctable)
# 4. cleanup
if cleanup:
for cnt in cnts:
Expand Down
Loading