Hello, the review for r67 is attached. It looks big, but mostly contains minor text changes ;-)
r66 looks good - no need for a review file. Regards, Christian Boltz -- > [submit-request #65647 declined by saschpe:] > description is >400 lines, too long :-) Where is a limit documented? [Stephan Kulow in opensuse-packaging]
------------------------------------------------------------ revno: 67 committer: Kshitij Gupta <kgupta8...@gmail.com branch nick: apparmor-profile-tools timestamp: Sat 2013-09-21 01:08:34 +0530 message: fixes from rev65 === modified file 'Translate/README' --- Translate/README 2013-09-20 13:50:41 +0000 +++ Translate/README 2013-09-20 19:38:34 +0000 # might need another update to use the easier available ;-) xgettext # # Syntax: # xgettext --language=Python --keyword=_ --output=Translate/messages.pot apparmor/*.py Tools/aa-* # (run from the main directory, not inside Translate) # xgettext will also give you a list of all texts containing multiple %s ;-) === modified file 'apparmor/aa.py' --- apparmor/aa.py 2013-09-20 13:50:41 +0000 +++ apparmor/aa.py 2013-09-20 19:38:34 +0000 @@ -340,10 +343,12 @@ """Modifies the profile to add the requirements""" reqs_processed = dict() reqs = get_reqs(path) + print(reqs) # debug code? @@ -2572,7 +2575,7 @@ + raise AppArmorException(_('%s profile in %s contains syntax errors in line: %s.') % (profile, file, lineno+1)) # "line %s" (without : ) @@ -2624,7 +2627,7 @@ elif RE_PROFILE_END.search(line): # If profile ends and we're not in one if not profile: - raise AppArmorException('Syntax Error: Unexpected End of Profile reached in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected End of Profile reached in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) # while at it, you should use %(file)s and %(lineno + 1)s - not sure if %(lineno + 1)s works... # (also in the following copy&paste review notes, even if I didn't paste this note everywhere ;-) @@ -2639,7 +2642,7 @@ matches = RE_PROFILE_CAP.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected capability entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected capability entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2658,7 +2661,7 @@ matches = RE_PROFILE_LINK.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected link entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected link entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2686,7 +2689,7 @@ matches = RE_PROFILE_CHANGE_PROFILE.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected change profile entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected change profile entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2708,7 +2711,7 @@ matches = RE_PROFILE_RLIMIT.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected rlimit entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected rlimit entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2719,7 +2722,7 @@ matches = RE_PROFILE_BOOLEAN.search(line) if not profile: - raise AppArmorException('Syntax Error: Unexpected boolean definition found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected boolean definition found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2759,7 +2762,7 @@ matches = RE_PROFILE_PATH_ENTRY.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected path entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected path entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2783,10 +2786,10 @@ try: re.compile(p_re) except: - raise AppArmorException('Syntax Error: Invalid Regex %s in file: %s line: %s' % (path, file, lineno+1)) + raise AppArmorException(_('Syntax Error: Invalid Regex %s in file: %s line: %s') % (path, file, lineno+1)) # "file %s line %s" (without : ) if not validate_profile_mode(mode, allow, nt_name): - raise AppArmorException('Invalid mode %s in file: %s line: %s' % (mode, file, lineno+1)) + raise AppArmorException(_('Invalid mode %s in file: %s line: %s') % (mode, file, lineno+1)) # "file %s line %s" (without : ) @@ -2836,7 +2839,7 @@ matches = RE_PROFILE_NETWORK.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected network entry found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected network entry found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2863,7 +2866,7 @@ matches = RE_PROFILE_CHANGE_HAT.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected change hat declaration found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected change hat declaration found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2875,7 +2878,7 @@ # An embedded hat syntax definition starts matches = RE_PROFILE_HAT_DEF.search(line).groups() if not profile: - raise AppArmorException('Syntax Error: Unexpected hat definition found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unexpected hat definition found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2911,7 +2914,7 @@ initial_comment = ' '.join(line) + '\n' else: - raise AppArmorException('Syntax Error: Unknown line found in file: %s line: %s' % (file, lineno+1)) + raise AppArmorException(_('Syntax Error: Unknown line found in file: %s line: %s') % (file, lineno+1)) # "file %s line %s" (without : ) @@ -2924,7 +2927,7 @@ # End of file reached but we're stuck in a profile if profile and not do_include: - raise AppArmorException("Syntax Error: Missing '}' . Reached end of file %s while inside profile %s" % (file, profile)) + raise AppArmorException(_("Syntax Error: Missing '}' . Reached end of file %s while inside profile %s") % (file, profile)) # "%s while" (one space is enough) @@ -2955,14 +2958,14 @@ var[list_var] = set(vlist) else: #print('Ignored: New definition for variable for:',list_var,'=', value, 'operation was:',var_operation,'old value=', var[list_var]) - raise AppArmorException('An existing variable redefined: %s' %list_var) + raise AppArmorException(_('An existing variable redefined: %s') %list_var) # that text sounds a bit strange # what about # Redefinition of existing variable %s # # BTW: filename and line number would be helpful vim:ft=diff
-- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor