~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/s3/client.py

  • Committer: Jamu Kakar
  • Author(s): Gustavo Niemeyer
  • Date: 2011-04-17 15:29:33 UTC
  • mfrom: (78.1.4 trunk)
  • Revision ID: jkakar@kakar.ca-20110417152933-630xjoukpnlczmdo
Merged fix-path-with-bucket [a=niemeyer] [r=jkakar] [f=762183]

S3 bucket names are correctly handled when object names are not used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
    def get_path(self):
50
50
        path = "/"
 
51
        if self.bucket is not None:
 
52
            path += self.bucket
51
53
        if self.bucket is not None and self.object_name:
52
 
            path += self.bucket
53
54
            if not self.object_name.startswith("/"):
54
55
                path += "/"
55
56
            path += self.object_name