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

« back to all changes in this revision

Viewing changes to ivle/webapp/submit/__init__.py

  • Committer: Matt Giuca
  • Date: 2009-04-07 10:47:48 UTC
  • Revision ID: matt.giuca@gmail.com-20090407104748-ptbifjvq1fi9wu4r
Tags: 0.1.9.11
submit: Fixed unicode and other bugs when submitting the empty path or "/".

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    tab = 'files'
40
40
    permission = 'submit_project'
41
41
 
42
 
    def __init__(self, req, name, path=""):
 
42
    def __init__(self, req, name, path=u"/"):
43
43
        # We need to work out which entity owns the repository, so we look
44
44
        # at the first two path segments. The first tells us the type.
45
45
        self.context = self.get_repository_owner(req.store, name)
46
 
        self.path = os.path.normpath(path)
 
46
        # XXX Re-convert to unicode (os.path.normpath(u"/") returns a str).
 
47
        self.path = unicode(os.path.normpath(path))
47
48
 
48
49
        if self.context is None:
49
50
            raise NotFound()