File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1414
1515import requests
1616from django .conf import settings
17- from django .core .files .uploadedfile import (
18- InMemoryUploadedFile ,
19- SimpleUploadedFile ,
20- TemporaryUploadedFile ,
21- )
17+ from django .core .files .uploadedfile import SimpleUploadedFile
2218from django .forms import ValidationError
2319from django .utils .translation import gettext_lazy as _
2420
25- from .celery import app
26-
2721PLUGIN_MAX_UPLOAD_SIZE = getattr (settings , "PLUGIN_MAX_UPLOAD_SIZE" , 25000000 ) # 25 mb
2822PLUGIN_REQUIRED_METADATA = getattr (
2923 settings ,
@@ -230,7 +224,6 @@ def validator(package, is_new: bool = False):
230224 * New plugins package_name is PEP8 compliant
231225
232226 """
233-
234227 try :
235228 if package .size > PLUGIN_MAX_UPLOAD_SIZE :
236229 raise ValidationError (
@@ -278,7 +271,6 @@ def validator(package, is_new: bool = False):
278271 % (forbidden_dir , zname )
279272 )
280273 )
281-
282274 bad_file = zip .testzip ()
283275 if bad_file :
284276 zip .close ()
@@ -506,4 +498,4 @@ def validator(package, is_new: bool = False):
506498 )
507499 % (k , e )
508500 )
509- return checked_metadata
501+ return checked_metadata
You can’t perform that action at this time.
0 commit comments