maya-umbrella 0.4.0__py2.py3-none-any.whl → 0.4.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maya-umbrella might be problematic. Click here for more details.
- maya_umbrella/__version__.py +1 -1
- maya_umbrella/core.py +1 -1
- maya_umbrella/filesystem.py +3 -6
- maya_umbrella/vaccine.py +6 -6
- maya_umbrella/vaccines/vaccine3.py +1 -1
- {maya_umbrella-0.4.0.dist-info → maya_umbrella-0.4.1.dist-info}/METADATA +3 -5
- {maya_umbrella-0.4.0.dist-info → maya_umbrella-0.4.1.dist-info}/RECORD +9 -9
- {maya_umbrella-0.4.0.dist-info → maya_umbrella-0.4.1.dist-info}/LICENSE +0 -0
- {maya_umbrella-0.4.0.dist-info → maya_umbrella-0.4.1.dist-info}/WHEEL +0 -0
maya_umbrella/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.4.
|
|
1
|
+
__version__ = "0.4.1"
|
maya_umbrella/core.py
CHANGED
|
@@ -67,7 +67,7 @@ class MayaVirusDefender(object):
|
|
|
67
67
|
for hook_file in get_hooks():
|
|
68
68
|
self.logger.debug("run_hook: %s", hook_file)
|
|
69
69
|
try:
|
|
70
|
-
load_hook(hook_file).hook(self.virus_cleaner)
|
|
70
|
+
load_hook(hook_file).hook(virus_cleaner=self.virus_cleaner)
|
|
71
71
|
except Exception as e:
|
|
72
72
|
self.logger.error("Error running hook: %s", e)
|
|
73
73
|
|
maya_umbrella/filesystem.py
CHANGED
|
@@ -110,8 +110,7 @@ def get_hooks():
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
def get_vaccines():
|
|
113
|
-
"""
|
|
114
|
-
Get a list of all vaccine files.
|
|
113
|
+
"""Get a list of all vaccine files.
|
|
115
114
|
|
|
116
115
|
Returns:
|
|
117
116
|
list: A list of vaccine files.
|
|
@@ -121,8 +120,7 @@ def get_vaccines():
|
|
|
121
120
|
|
|
122
121
|
|
|
123
122
|
def get_log_root():
|
|
124
|
-
"""
|
|
125
|
-
Get the log root directory.
|
|
123
|
+
"""Get the log root directory.
|
|
126
124
|
|
|
127
125
|
Returns:
|
|
128
126
|
str: The log root directory.
|
|
@@ -131,8 +129,7 @@ def get_log_root():
|
|
|
131
129
|
|
|
132
130
|
|
|
133
131
|
def get_log_file():
|
|
134
|
-
"""
|
|
135
|
-
Get the path of the log file.
|
|
132
|
+
"""Get the path of the log file.
|
|
136
133
|
|
|
137
134
|
Returns:
|
|
138
135
|
str: The path of the log file.
|
maya_umbrella/vaccine.py
CHANGED
|
@@ -150,7 +150,7 @@ class MayaVirusCleaner(object):
|
|
|
150
150
|
def fix_script_jobs(self):
|
|
151
151
|
for script_job in self.bad_script_jobs:
|
|
152
152
|
script_num = int(script_job.split(":", 1)[0])
|
|
153
|
-
self.logger.info("Kill script job
|
|
153
|
+
self.logger.info("Kill script job %s", script_job)
|
|
154
154
|
cmds.scriptJob(kill=script_num, force=True)
|
|
155
155
|
self._bad_script_jobs.remove(script_job)
|
|
156
156
|
|
|
@@ -158,11 +158,11 @@ class MayaVirusCleaner(object):
|
|
|
158
158
|
for file_ in self.bad_files:
|
|
159
159
|
if os.path.exists(file_):
|
|
160
160
|
if os.path.isfile(file_):
|
|
161
|
-
self.logger.info("Removing
|
|
161
|
+
self.logger.info("Removing %s", file_)
|
|
162
162
|
safe_remove_file(file_)
|
|
163
163
|
self._bad_files.remove(file_)
|
|
164
164
|
else:
|
|
165
|
-
self.logger.info("Removing folder
|
|
165
|
+
self.logger.info("Removing folder %s", file_)
|
|
166
166
|
safe_rmtree(file_)
|
|
167
167
|
self._bad_files.remove(file_)
|
|
168
168
|
|
|
@@ -189,9 +189,9 @@ class MayaVirusCleaner(object):
|
|
|
189
189
|
|
|
190
190
|
def report_all_issues(self):
|
|
191
191
|
"""Report all issues related to the Maya virus."""
|
|
192
|
-
self.logger.info("Bad files:
|
|
193
|
-
self.logger.info("Bad nodes:
|
|
194
|
-
self.logger.info("Bad script jobs:
|
|
192
|
+
self.logger.info("Bad files: %s", self.bad_files)
|
|
193
|
+
self.logger.info("Bad nodes: %s", self.bad_nodes)
|
|
194
|
+
self.logger.info("Bad script jobs: %s", self.bad_script_jobs)
|
|
195
195
|
|
|
196
196
|
def reset_all_issues(self):
|
|
197
197
|
"""Reset all issues related to the Maya virus."""
|
|
@@ -68,7 +68,7 @@ class Vaccine(AbstractVaccine):
|
|
|
68
68
|
self.report_issue(hik_mel)
|
|
69
69
|
with open(hik_mel, "wb") as f:
|
|
70
70
|
f.write(re.sub(self.hik_regex, "", data))
|
|
71
|
-
self.logger.
|
|
71
|
+
self.logger.info("Remove virus code from %s", hik_mel)
|
|
72
72
|
|
|
73
73
|
def collect_issues(self):
|
|
74
74
|
"""Collect all issues related to the virus."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: maya_umbrella
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Check and fix maya virus.
|
|
5
5
|
Home-page: https://github.com/loonghao/maya_umbrella
|
|
6
6
|
License: MIT
|
|
@@ -50,7 +50,7 @@ Check and fix maya virus.
|
|
|
50
50
|
|
|
51
51
|
# 发开环境设置
|
|
52
52
|
|
|
53
|
-
python
|
|
53
|
+
通过虚拟环境去设置开发环境, 推荐python-3.8以上的版本
|
|
54
54
|
|
|
55
55
|
```shell
|
|
56
56
|
pip install nox poetry
|
|
@@ -85,9 +85,7 @@ manual_test_in_maya.start()
|
|
|
85
85
|
我们可以利用封装好的`nox`命令去执行进行代码检查
|
|
86
86
|
|
|
87
87
|
```shell
|
|
88
|
-
nox -s
|
|
89
|
-
nox -s black
|
|
90
|
-
nox -s isort
|
|
88
|
+
nox -s ruff_check
|
|
91
89
|
```
|
|
92
90
|
|
|
93
91
|
# 环境变量
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
maya_umbrella/__init__.py,sha256=039hJesYFSc1aXypFRo1PVQvqowJJ9Q_bAdfcEQI2qk,106
|
|
2
|
-
maya_umbrella/__version__.py,sha256=
|
|
2
|
+
maya_umbrella/__version__.py,sha256=pMtTmSUht-XtbR_7Doz6bsQqopJJd8rZ8I8zy2HwwoA,22
|
|
3
3
|
maya_umbrella/constants.py,sha256=SuD8OP8e0Kh3a9ohyS5_MXjo5pHNQ8MWEPtJ6puZfIU,130
|
|
4
|
-
maya_umbrella/core.py,sha256=
|
|
5
|
-
maya_umbrella/filesystem.py,sha256=
|
|
4
|
+
maya_umbrella/core.py,sha256=kUaDyDPwD92e2D3GIRPRUMZ2MAnf7DlaGBbBl753NwY,4112
|
|
5
|
+
maya_umbrella/filesystem.py,sha256=EwOtPvl9UhjOu2YYW1hyIbmqsdcseu6ye0Bnuzf2khU,4125
|
|
6
6
|
maya_umbrella/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
maya_umbrella/hooks/delete_turtle.py,sha256=G5zzMFn9L9lSydvFiscUIqSgLbHZlWUV0lfUtnhvQUw,734
|
|
8
8
|
maya_umbrella/hooks/delete_unknown_plugin_node.py,sha256=PxufrH9eqUP6Y28bseTWmCaO_0M4zeHzexIJpws9Q2U,1246
|
|
9
9
|
maya_umbrella/hooks/fix_model_panel.py,sha256=DLXPo_E9Q1C6a3Dpye4jWCSqfjZxG0iBduMhORV5vKo,546
|
|
10
10
|
maya_umbrella/hooks/fix_on_model_change_3dc.py,sha256=PPnU70Ed_TW9j5nkQnbQ2EEGVo5jm5T6gimzOQYbgCY,457
|
|
11
11
|
maya_umbrella/log.py,sha256=IJweFEBTThL6_mW86jAAPKyWNvI79CrMifs5vO3t6ks,1338
|
|
12
|
-
maya_umbrella/vaccine.py,sha256=
|
|
12
|
+
maya_umbrella/vaccine.py,sha256=W6JhnA7j4rjltF8jIoAXVMFq3v1d_dTyZaQGhq2dkWk,7033
|
|
13
13
|
maya_umbrella/vaccines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
maya_umbrella/vaccines/vaccine1.py,sha256=oM41xlB49YPl_S760TqFyosDVIAIZOzsqkcL5sh679s,430
|
|
15
15
|
maya_umbrella/vaccines/vaccine2.py,sha256=XRnQFSvbTXxgr8FZ8eU6s_h_Uwyt429a93gyfDyglic,2526
|
|
16
|
-
maya_umbrella/vaccines/vaccine3.py,sha256=
|
|
17
|
-
maya_umbrella-0.4.
|
|
18
|
-
maya_umbrella-0.4.
|
|
19
|
-
maya_umbrella-0.4.
|
|
20
|
-
maya_umbrella-0.4.
|
|
16
|
+
maya_umbrella/vaccines/vaccine3.py,sha256=KLGSSLPqTjrVjcrT65wQNuM31MoDBFTc0kmAoLzu2NI,3053
|
|
17
|
+
maya_umbrella-0.4.1.dist-info/LICENSE,sha256=tJf0Pz8q_65AjEkm3872K1cl4jGil28vJO5Ko_LhUqc,1060
|
|
18
|
+
maya_umbrella-0.4.1.dist-info/METADATA,sha256=Vx3UbEyZHJnpJtVk2nak1RUgU4ZZ1MDjEm84CcdzcJo,6710
|
|
19
|
+
maya_umbrella-0.4.1.dist-info/WHEEL,sha256=IrRNNNJ-uuL1ggO5qMvT1GGhQVdQU54d6ZpYqEZfEWo,92
|
|
20
|
+
maya_umbrella-0.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|