~ubuntu-branches/ubuntu/trusty/simplestreams/trusty-proposed

« back to all changes in this revision

Viewing changes to simplestreams/mirrors/__init__.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-10-09 17:30:23 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20131009173023-6opicbdem1t7d98q
Tags: 0.1.0~bzr315-0ubuntu1
* New upstream snapshot.
  * fix interpreter written on sstream-sync, sstream-query and
    sstream-mirror. It should be python3, not python2.7. (LP: #1237637)
  * simplestreams/mirrors/__init__.py: fix bug causing resumed downloads
    to stack trace (LP: #1237658)

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
        mirrors = [m + path for m in self.mirrors]
176
176
        # A little hack to fix up the user's path. It's fairly common to
177
177
        # specify URLs without a trailing slash, so we try to that here as
178
 
        # well.
 
178
        # well. We open, then close and then get a new one (so the one we
 
179
        # returned is not yet open (LP: #1237658)
179
180
        try:
180
181
            csource = self._cs(self.prefix + path, mirrors=mirrors)
181
182
            csource.open()
182
 
            return csource
 
183
            csource.close()
 
184
            return self._cs(self.prefix + path, mirrors=mirrors)
183
185
        except IOError as e:
184
186
            if (e.errno == errno.ENOENT
185
187
                    and not self._trailing_slash_checked