diff options
author | Colin Watson <cjwatson@debian.org> | 2019-08-03 13:04:54 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-08-03 13:04:54 +0100 |
commit | 598127c3f7073cfc5fa8868d6fa35d036d15b5b3 (patch) | |
tree | d1c83dc2e642ac62e5203923c1145db8df518fd4 | |
parent | e3c076c43112107cdad2ff0c2a026e6dffe7c38a (diff) |
debian/apport/source_grub2.py: Fix flake8 errors
-rw-r--r-- | debian/apport/source_grub2.py | 9 | ||||
-rw-r--r-- | debian/changelog | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/debian/apport/source_grub2.py b/debian/apport/source_grub2.py index c6fda6d00..90182af4d 100644 --- a/debian/apport/source_grub2.py +++ b/debian/apport/source_grub2.py @@ -23,6 +23,7 @@ from apport.hookutils import ( path_to_key, ) + def check_shell_syntax(path): ''' Check the syntax of a shell script ''' try: @@ -32,6 +33,7 @@ def check_shell_syntax(path): return False return True + def check_shell_syntax_harder(path): ''' Check the syntax of a shell script ''' try: @@ -61,7 +63,7 @@ def check_shell_syntax_harder(path): def add_info(report): if report['ProblemType'] == 'Package': # To detect if root fs is a loop device - attach_file(report, '/proc/cmdline','ProcCmdLine') + attach_file(report, '/proc/cmdline', 'ProcCmdLine') attach_default_grub(report, 'EtcDefaultGrub') attach_file_if_exists(report, '/boot/grub/device.map', 'DeviceMap') try: @@ -80,9 +82,9 @@ def add_info(report): # Check scripts in /etc/grub.d since some users directly change # configuration there - grubdir='/etc/grub.d' + grubdir = '/etc/grub.d' for f in os.listdir(grubdir): - fullpath=os.path.join(grubdir, f) + fullpath = os.path.join(grubdir, f) if f != 'README' and os.access(fullpath, os.X_OK) \ and not check_shell_syntax(fullpath): invalid_grub_script.append(fullpath) @@ -93,6 +95,7 @@ def add_info(report): if invalid_grub_script: report['InvalidGrubScript'] = ' '.join(invalid_grub_script) + if __name__ == '__main__': r = {} r['ProblemType'] = 'Package' diff --git a/debian/changelog b/debian/changelog index e13b70eb8..69a88cc85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,9 @@ grub2 (2.04-2) UNRELEASED; urgency=medium [ Colin Watson ] * Use debhelper-compat instead of debian/compat. - * debian/apport/source_grub2.py: Avoid star import. + * debian/apport/source_grub2.py: + - Avoid star import. + - Fix flake8 errors. -- Colin Watson <cjwatson@debian.org> Tue, 09 Jul 2019 15:04:41 +0100 |