Skip to content

Commit

Permalink
fix invalid corss-device link in os.rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy committed Nov 14, 2024
1 parent 58d0f72 commit 81cf4fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wecube_plugins_itsdangerous/apps/processor/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os.path
import re
import tempfile
import shutil

import requests
from talos.common import cache
Expand Down Expand Up @@ -87,7 +88,8 @@ def ensure_url_cached(url):
LOG.info('download from: %s for pakcage: %s', url, url)
filepath = download_from_url(download_path, url)
LOG.info('download complete')
os.rename(filepath, cached_file_path)
shutil.move(filepath, cached_file_path)
# os.rename(filepath, cached_file_path)
else:
raise OSError(_('failed to acquire lock, package cache may not be available'))
return cached_file_path, filename
Expand Down

0 comments on commit 81cf4fa

Please sign in to comment.