mirror of
https://github.com/koush/scrypted.git
synced 2026-06-20 16:40:30 +01:00
python: purge packages on update
This commit is contained in:
@@ -423,7 +423,18 @@ class PluginRemote:
|
||||
pass
|
||||
|
||||
if need_pip:
|
||||
shutil.rmtree(python_prefix)
|
||||
try:
|
||||
for de in os.listdir(plugin_volume):
|
||||
if de.startswith('linux') or de.startswith('darwin') or de.startswith('win32') or de.startswith('python') or de.startswith('node'):
|
||||
filePath = os.path.join(plugin_volume, de)
|
||||
print('Removing old dependencies: %s' % filePath)
|
||||
try:
|
||||
shutil.rmtree(filePath)
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
|
||||
os.makedirs(python_prefix)
|
||||
|
||||
print('requirements.txt (outdated)')
|
||||
|
||||
Reference in New Issue
Block a user