summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2015-10-24 00:58:14 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2015-10-30 18:39:52 +0000
commitd280fa9fbdecf3fc741e49e28281b590e2e93496 (patch)
treef836924825e75201a103b3d3e8561ba9fca8780d /packaging
parent807fa609f9449f1f18b40ad98c350eca2211037a (diff)
downloaddeluge-d280fa9fbdecf3fc741e49e28281b590e2e93496.tar.gz
deluge-d280fa9fbdecf3fc741e49e28281b590e2e93496.tar.bz2
deluge-d280fa9fbdecf3fc741e49e28281b590e2e93496.zip
[Lint] Cleanup helper scripts to pass PyLint
Diffstat (limited to 'packaging')
-rw-r--r--packaging/win32/deluge-bbfreeze.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/packaging/win32/deluge-bbfreeze.py b/packaging/win32/deluge-bbfreeze.py
index 1a074f1b3..d3ecaa917 100644
--- a/packaging/win32/deluge-bbfreeze.py
+++ b/packaging/win32/deluge-bbfreeze.py
@@ -11,6 +11,8 @@
# See LICENSE for more details.
#
+from __future__ import print_function
+
import glob
import os
import re
@@ -27,7 +29,7 @@ import deluge.common
class VersionInfo(object):
def __init__(self, version, internalname=None, originalfilename=None,
comments=None, company=None, description=None,
- copyright=None, trademarks=None, product=None, dll=False,
+ _copyright=None, trademarks=None, product=None, dll=False,
debug=False, verbose=True):
parts = version.split(".")
while len(parts) < 4:
@@ -38,7 +40,7 @@ class VersionInfo(object):
self.comments = comments
self.company = company
self.description = description
- self.copyright = copyright
+ self.copyright = _copyright
self.trademarks = trademarks
self.product = product
self.dll = dll
@@ -105,7 +107,7 @@ for script in glob.glob(os.path.join(python_path, "Scripts\\deluge*-script.py*")
try:
fzr.addScript(new_script, gui_only=gui_script)
script_list.append(new_script)
- except:
+ except Exception:
os.remove(script)
# Start the freezing process.
@@ -120,9 +122,9 @@ excludeDlls = ("MSIMG32.dll", "MSVCR90.dll", "MSVCP90.dll", "MSVCR120.dll",
"POWRPROF.dll", "DNSAPI.dll", "USP10.dll", "MPR.dll",
"jpeg.dll", "libfreetype-6.dll", "libpng12-0.dll", "libtiff.dll",
"SDL_image.dll", "SDL_ttf.dll")
-for dll in excludeDlls:
+for exclude_dll in excludeDlls:
try:
- os.remove(os.path.join(build_dir, dll))
+ os.remove(os.path.join(build_dir, exclude_dll))
except OSError:
pass
@@ -135,11 +137,11 @@ gtk_locale = os.path.join(gtk_root, 'share/locale')
locale_include_list = ['gtk20.mo', 'locale.alias']
-def ignored_files(adir, filenames):
+def ignored_files(adir, ignore_filenames):
return [
- filename for filename in filenames
- if not os.path.isdir(os.path.join(adir, filename))
- and filename not in locale_include_list
+ ignore_file for ignore_file in ignore_filenames
+ if not os.path.isdir(os.path.join(adir, ignore_file)) and
+ ignore_file not in locale_include_list
]
shutil.copytree(gtk_locale, os.path.join(build_dir, 'share/locale'), ignore=ignored_files)
@@ -160,7 +162,7 @@ for path_root, path in theme_include_list:
dst_dir = os.path.join(build_dir, os.path.dirname(path))
try:
os.makedirs(dst_dir)
- except:
+ except OSError:
pass
shutil.copy(full_path, dst_dir)
@@ -173,7 +175,7 @@ for script in script_list:
description="Deluge Bittorrent Client",
company="Deluge Team",
product="Deluge",
- copyright="Deluge Team")
+ _copyright="Deluge Team")
stamp(os.path.join(build_dir, script_exe), versionInfo)
# Copy version info to file for nsis script.