~sbeattie/apparmor-profile-tools/pre-merger-cleanups

« back to all changes in this revision

Viewing changes to Tools/aa-genprof

  • Committer: kgupta8592 at gmail
  • Date: 2013-12-29 09:42:30 UTC
  • Revision ID: kgupta8592@gmail.com-20131229094230-i0v3l8hz4h5x14c6
Fixed some variable name conflicts, moved some code to methods from functions. Fixes the bug in custom logfile name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
filename = args.file
60
60
 
61
61
 
62
 
if not os.path.isfile(filename):
63
 
    raise apparmor.AppArmorException(_('The logfile %s does not exist. Please check the path') % filename)
64
 
 
65
 
apparmor.filename = filename
 
62
if filename:
 
63
    if not os.path.isfile(filename):
 
64
        raise apparmor.AppArmorException(_('The logfile %s does not exist. Please check the path') % filename)
 
65
    else:
 
66
        apparmor.filename = filename
66
67
 
67
68
aa_mountpoint = apparmor.check_for_apparmor()
68
69
if not aa_mountpoint: