Add reloading support to Docker container
This commit is contained in:
@@ -25,7 +25,7 @@ from PIL import Image
|
||||
ALLOWED_RESOLUTIONS=[(100,67), (270,180), (350,233)]
|
||||
|
||||
def mkdir(path):
|
||||
assert(path != "" and path is not None)
|
||||
assert path != "" and path is not None
|
||||
if not os.path.isdir(path):
|
||||
os.mkdir(path)
|
||||
|
||||
|
||||
@@ -752,7 +752,7 @@ class PackageRelease(db.Model):
|
||||
not self.package.checkPerm(user, Permission.APPROVE_RELEASE):
|
||||
return False
|
||||
|
||||
assert(self.task_id is None and self.url is not None and self.url != "")
|
||||
assert self.task_id is None and self.url is not None and self.url != ""
|
||||
|
||||
self.approved = True
|
||||
return True
|
||||
|
||||
@@ -121,7 +121,7 @@ def parseForumListPage(id, page, out, extra=None):
|
||||
|
||||
if id in out:
|
||||
print(" - got {} again, title: {}".format(id, title))
|
||||
assert(title == out[id]['title'])
|
||||
assert title == out[id]['title']
|
||||
return False
|
||||
|
||||
row = {
|
||||
|
||||
@@ -46,13 +46,13 @@ def randomString(n):
|
||||
return ''.join(random.choice(string.ascii_lowercase + \
|
||||
string.ascii_uppercase + string.digits) for _ in range(n))
|
||||
|
||||
assert(os.path.isdir(app.config["UPLOAD_DIR"]), "UPLOAD_DIR must exist")
|
||||
|
||||
def doFileUpload(file, fileType, fileTypeDesc):
|
||||
if not file or file is None or file.filename == "":
|
||||
flash("No selected file", "error")
|
||||
return None
|
||||
|
||||
assert os.path.isdir(app.config["UPLOAD_DIR"]), "UPLOAD_DIR must exist"
|
||||
|
||||
allowedExtensions = []
|
||||
isImage = False
|
||||
if fileType == "image":
|
||||
|
||||
Reference in New Issue
Block a user