Commits

Gert Van Gool committed 2180945

Return empty string when we try to get the URL of a key that doesn't exist in the bucket

Comments (0)

Files changed (1)

backends/s3boto.py

 
     def url(self, name):
         name = self._clean_name(name)
+        if self.bucket.get_key(name) is None:
+            return ''
         return self.bucket.get_key(name).generate_url(QUERYSTRING_EXPIRE, method='GET', query_auth=QUERYSTRING_AUTH)
 
     def get_available_name(self, name):