|
|
@ -169,7 +169,7 @@ class DelugeRPC(object): |
|
|
|
if options['label']: |
|
|
|
self.client.label.set_torrent(torrent_id, options['label']).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to add torrent magnet: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to add torrent magnet: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
@ -184,7 +184,7 @@ class DelugeRPC(object): |
|
|
|
if options['label']: |
|
|
|
self.client.label.set_torrent(torrent_id, options['label']).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to add torrent file: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to add torrent file: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
@ -197,7 +197,7 @@ class DelugeRPC(object): |
|
|
|
self.connect() |
|
|
|
ret = self.client.core.get_torrents_status({}, {}).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to get all torrents: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to get all torrents: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
@ -208,7 +208,7 @@ class DelugeRPC(object): |
|
|
|
self.connect() |
|
|
|
self.client.core.pause_torrent(torrent_ids).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to pause torrent: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to pause torrent: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
@ -218,7 +218,7 @@ class DelugeRPC(object): |
|
|
|
self.connect() |
|
|
|
self.client.core.resume_torrent(torrent_ids).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to resume torrent: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to resume torrent: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
@ -229,7 +229,7 @@ class DelugeRPC(object): |
|
|
|
self.connect() |
|
|
|
ret = self.client.core.remove_torrent(torrent_id, remove_local_data).get() |
|
|
|
except Exception, err: |
|
|
|
log.error('Failed to remove torrent: %s %s', err, traceback.format_exc()) |
|
|
|
log.error('Failed to remove torrent: %s %s', (err, traceback.format_exc())) |
|
|
|
finally: |
|
|
|
if self.client: |
|
|
|
self.disconnect() |
|
|
|