mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Fix more pyflakes issues that cause make check to fail
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# No old version logs, only 2.6 + supported
|
||||
from __future__ import with_statement
|
||||
import gettext
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
@@ -28,12 +27,10 @@ import tempfile
|
||||
import apparmor.config
|
||||
import apparmor.logparser
|
||||
import apparmor.severity
|
||||
import LibAppArmor
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
from apparmor.common import (AppArmorException, error, debug, msg, cmd,
|
||||
open_file_read, valid_path, hasher,
|
||||
from apparmor.common import (AppArmorException, open_file_read, valid_path, hasher,
|
||||
open_file_write, convert_regexp, DebugLogger)
|
||||
|
||||
import apparmor.ui as aaui
|
||||
@@ -313,7 +310,7 @@ def head(file):
|
||||
def get_output(params):
|
||||
"""Returns the return code output by running the program with the args given in the list"""
|
||||
program = params[0]
|
||||
args = params[1:]
|
||||
# args = params[1:]
|
||||
ret = -1
|
||||
output = []
|
||||
# program is executable
|
||||
@@ -454,7 +451,7 @@ def get_profile(prof_name):
|
||||
profile_data = None
|
||||
distro = cfg['repository']['distro']
|
||||
repo_url = cfg['repository']['url']
|
||||
local_profiles = []
|
||||
# local_profiles = []
|
||||
profile_hash = hasher()
|
||||
if repo_is_enabled():
|
||||
aaui.UI_BusyStart(_('Connecting to repository...'))
|
||||
|
@@ -11,16 +11,12 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
import gettext
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import LibAppArmor
|
||||
from apparmor.common import (AppArmorException, error, debug,
|
||||
open_file_read, valid_path, hasher,
|
||||
open_file_write, convert_regexp,
|
||||
DebugLogger)
|
||||
from apparmor.common import AppArmorException, open_file_read, DebugLogger
|
||||
|
||||
from apparmor.aamode import validate_log_mode, log_str_to_mode, hide_log_mode, AA_MAY_EXEC
|
||||
|
||||
|
@@ -64,7 +64,7 @@ class Severity(object):
|
||||
try:
|
||||
resource, severity = line.split()
|
||||
severity = int(severity)
|
||||
except ValueError as e:
|
||||
except ValueError:
|
||||
error_message = 'No severity value present in file: %s\n\t[Line %s]: %s' % (dbname, lineno, line)
|
||||
#error(error_message)
|
||||
raise AppArmorException(error_message) # from None
|
||||
|
@@ -11,7 +11,6 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
import gettext
|
||||
import sys
|
||||
import re
|
||||
from apparmor.yasti import yastLog, SendDataToYast, GetDataFromYast
|
||||
|
@@ -13,7 +13,6 @@
|
||||
# ----------------------------------------------------------------------
|
||||
import re
|
||||
#import ycp
|
||||
import os
|
||||
import sys
|
||||
|
||||
from apparmor.common import error, DebugLogger
|
||||
|
Reference in New Issue
Block a user