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

« back to all changes in this revision

Viewing changes to ivle/fileservice_lib/action.py

  • Committer: William Grant
  • Date: 2010-07-28 05:06:15 UTC
  • Revision ID: grantw@unimelb.edu.au-20100728050615-uwbxn9frla3pdw8m
Encode content_type when downloading files. cjson made us write bad code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
    """
318
318
    frompath = fields.getfirst('from')
319
319
    topath = fields.getfirst('to')
320
 
    movefile(req, frompath, topath)
 
320
    svn = fields.getfirst('svn')
 
321
    if svn:
 
322
        svn_movefile(req, frompath, topath)
 
323
    else:
 
324
        movefile(req, frompath, topath)
321
325
 
322
326
def action_mkdir(req, fields):
323
327
    """Creates a directory with the given path.
718
722
    except pysvn.ClientError, e:
719
723
        # Error code 170000 means ENOENT in this revision.
720
724
        if e[1][0][1] == 170000:
721
 
            raise util.IVLEError(404, 'The specified repository path does not exist')
 
725
            req.status = 404
 
726
            raise ActionError('The specified repository path does not exist')
722
727
        else:
723
728
            raise ActionError(str(e[0]))
724
729