~ubuntu-branches/ubuntu/wily/system-image/wily-proposed

« back to all changes in this revision

Viewing changes to systemimage/download.py

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Barry Warsaw
  • Date: 2014-09-17 17:56:45 UTC
  • mfrom: (1.2.26)
  • Revision ID: package-import@ubuntu.com-20140917175645-3zt7e1wqtq776s1q
Tags: 2.4-0ubuntu1
[ Barry Warsaw ]
* New upstream release.
  - LP: #1353178 - The channel.ini file can override the device name by
    setting `[service]device`.
  - LP: #1324241 - Add optional instrumentation to collect code coverage
    data during test suite run via tox.
  - LP: #1279970 - When an exception occurs in a `system-image-dbus`
    D-Bus method, signal, or callback, this exception is logged in the
    standard log file, and the process exits.  Also, `[system]loglevel`
    can now take an optional ":level" prefix which can be used to set
    the log level for the D-Bus API methods.  By default, they log at
    `ERROR` level, but can be set lower for debugging purposes.
  - LP: #1365646 - Don't crash when releasing an unacquired checking lock.
  - LP: #1365761 - When checking files for `last_update_date()` ignore
    PermissionErrors and just keep checking the fall backs.
  - LP: #1369714 - `system-image-cli --dbus` has been deprecated and
    will be removed in the future.
* d/control: Remove tox as a build dependency to avoid having to MIR tox,
  virtualenv, and pip.
* d/rules:
  - Call nose2 explicitly to avoid use of tox.
  - Remove unnecessary override_dh_auto_clean rule.
* d/system-image-common.post{inst,rm}: `set -e` to make lintian happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
 
142
142
    def _do_paused(self, signal, path, paused):
143
143
        _print('PAUSE:', paused, self._pausable)
144
 
        if self._pausable and config.dbus_service is not None:
 
144
        send_paused = self._pausable and config.dbus_service is not None
 
145
        if send_paused:                             # pragma: no branch
145
146
            # We could plumb through the `service` object from service.py (the
146
147
            # main entry point for system-image-dbus, but that's actually a
147
148
            # bit of a pain, so do the expedient thing and grab the interface
155
156
        # There currently is no UpdateResumed() signal.
156
157
 
157
158
    def _default(self, *args, **kws):
158
 
        _print('SIGNAL:', args, kws)
 
159
        _print('SIGNAL:', args, kws)                # pragma: no cover
159
160
 
160
161
 
161
162
class DBusDownloadManager:
171
172
        self._queued_cancel = False
172
173
        self.callback = callback
173
174
 
174
 
    def __repr__(self):
 
175
    def __repr__(self): # pragma: no cover
175
176
        return '<DBusDownloadManager at 0x{:x}>'.format(id(self))
176
177
 
177
178
    def get_files(self, downloads, *, pausable=False):
316
317
 
317
318
    def pause(self):
318
319
        """Pause the download, but only if one is in progress."""
319
 
        if self._iface is not None:
 
320
        if self._iface is not None:                 # pragma: no branch
320
321
            self._iface.pause()
321
322
 
322
323
    def resume(self):
323
324
        """Resume the download, but only if one is in progress."""
324
 
        if self._iface is not None:
 
325
        if self._iface is not None:                 # pragma: no branch
325
326
            self._iface.resume()