From 0655b30a3dbb2553f5477034d23e17b27da79748 Mon Sep 17 00:00:00 2001 From: bwq Date: Wed, 12 Oct 2011 13:33:44 +0200 Subject: [PATCH] Magic indentations baby! --- couchpotato/core/downloaders/blackhole/main.py | 38 +++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/couchpotato/core/downloaders/blackhole/main.py b/couchpotato/core/downloaders/blackhole/main.py index ebb97fd..1f45001 100644 --- a/couchpotato/core/downloaders/blackhole/main.py +++ b/couchpotato/core/downloaders/blackhole/main.py @@ -19,29 +19,29 @@ class Blackhole(Downloader): log.error('No directory set for blackhole %s download.' % data.get('type')) else: try: - file = data.get('download')(url = data.get('url'), nzb_id = data.get('id')) + file = data.get('download')(url = data.get('url'), nzb_id = data.get('id')) - if "no nzb" in file: - log.error('No nzb available!') - return False + if "no nzb" in file: + log.error('No nzb available!') + return False - fullPath = os.path.join(directory, self.createFileName(data, file, movie)) + fullPath = os.path.join(directory, self.createFileName(data, file, movie)) - try: - if not os.path.isfile(fullPath): - log.info('Downloading %s to %s.' % (data.get('type'), fullPath)) - with open(fullPath, 'wb') as f: - f.write(file) - return True - else: - log.info('File %s already exists.' % fullPath) - return True + try: + if not os.path.isfile(fullPath): + log.info('Downloading %s to %s.' % (data.get('type'), fullPath)) + with open(fullPath, 'wb') as f: + f.write(file) + return True + else: + log.info('File %s already exists.' % fullPath) + return True - except: - log.error('Failed to download to blackhole %s' % traceback.format_exc()) - pass + except: + log.error('Failed to download to blackhole %s' % traceback.format_exc()) + pass except: - log.debug('Failed to download file: %s' % data.get('name')) - return False + log.debug('Failed to download file: %s' % data.get('name')) + return False return False