Skip to content
Permalink
Browse files

Badzipfile error

Fixing workshop id detection and remove fix message
  • Loading branch information...
Smashman committed May 26, 2018
1 parent b4e3e58 commit b08aacf52ac4e17d98d06263717dc50d71fb5939
Showing with 5 additions and 2 deletions.
  1. +2 −1 app/mods/views.py
  2. +3 −0 app/utils/utils.py
  3. +0 −1 app/views.py
@@ -99,8 +99,9 @@ def edit(mod_id):
mod.description = edit_form.description.data
workshop_id = edit_form.workshop_id.data
if workshop_id:
from re import match
try:
if "http://steamcommunity.com/sharedfiles/filedetails/" in workshop_id:
if match("http[s]?:\/\/(www\.)?steamcommunity\.com\/sharedfiles\/filedetails\/", workshop_id):
from urlparse import urlparse, parse_qs
workshop_id = parse_qs(urlparse(workshop_id).query).get("id")[0]
int(workshop_id)
@@ -47,6 +47,9 @@ def extract_and_image(zip_in, db_record):
except KeyError:
flash("No manifest, please upload a Workshop zip.", "danger")
return
except BadZipfile:
flash("Archive is corrupt, please try repackaging your item before trying again.", "danger")
return
print "Converting manifest. vdf -> dict"
else:
flash("Zip is too large when extracted, min size is ~100MB", "danger")
@@ -7,7 +7,6 @@

@app.route('/')
def index():
flash(u"Login has been fixed, apologies for the downtime!", "success")
mods = Mod.query.filter_by(visibility="Pu", enabled=True, completed=True).limit(18).all()
for mod in mods:
mod_stats = get_mod_stats(mod)

0 comments on commit b08aacf

Please sign in to comment.
You can’t perform that action at this time.