comparison planemo/lib/python3.7/site-packages/virtualenv/app_data/na.py @ 1:56ad4e20f292 draft

"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author guerler
date Fri, 31 Jul 2020 00:32:28 -0400
parents
children
comparison
equal deleted inserted replaced
0:d30785e31577 1:56ad4e20f292
1 from __future__ import absolute_import, unicode_literals
2
3 from contextlib import contextmanager
4
5 from .base import AppData, ContentStore
6
7
8 class AppDataDisabled(AppData):
9 """No application cache available (most likely as we don't have write permissions)"""
10
11 def __init__(self):
12 pass
13
14 error = RuntimeError("no app data folder available, probably no write access to the folder")
15
16 def close(self):
17 """do nothing"""
18
19 def reset(self):
20 """do nothing"""
21
22 def py_info(self, path):
23 return ContentStoreNA()
24
25 def embed_update_log(self, distribution, for_py_version):
26 return ContentStoreNA()
27
28 def extract(self, path, to_folder):
29 raise self.error
30
31 @contextmanager
32 def locked(self, path):
33 """do nothing"""
34 yield
35
36 @property
37 def house(self):
38 raise self.error
39
40 def wheel_image(self, for_py_version, name):
41 raise self.error
42
43 @property
44 def transient(self):
45 return True
46
47 def py_info_clear(self):
48 """"""
49
50
51 class ContentStoreNA(ContentStore):
52 def exists(self):
53 return False
54
55 def read(self):
56 """"""
57 return None
58
59 def write(self, content):
60 """"""
61
62 def remove(self):
63 """"""
64
65 @contextmanager
66 def locked(self):
67 yield