~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/zip.py

Implement ToS acceptance in the new login machinery. Now implemented through
the usual ToS view, giving it an extra mode for when the user is invalid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import zipfile
28
28
 
29
29
from ivle import studpath
 
30
from ivle.fileservice_lib.exceptions import WillNotOverwrite
30
31
 
31
32
def make_zip(basepath, paths, file):
32
33
    """Zips up a bunch of files on the student file space and writes it as
94
95
    The path is an absolute path in the current filesystem
95
96
    (if this code is executed inside the jail, then it's inside the jail).
96
97
    """
97
 
    # XXX: Really bad, but circular imports need avoiding.
98
 
    from ivle.fileservice_lib.exceptions import WillNotOverwrite
99
 
 
100
98
    zip = zipfile.ZipFile(file, 'r')
101
99
    # First test the zip file
102
100
    if zip.testzip() is not None: