~apparmor-dev/apparmor/apparmor-ubuntu-citrain

« back to all changes in this revision

Viewing changes to utils/apparmor/ui.py

  • Committer: Steve Beattie
  • Date: 2014-12-19 07:09:46 UTC
  • Revision ID: sbeattie@ubuntu.com-20141219070946-8npkw7rtcrwi00ri
* Update to apparmor 2.9.1
  - make parser mount rule options consistent with documentation
    (LP: #1401619)
  - make parser fail if unknown mount options are encountered
    (LP: #1401621)
  - stop aa-logprof from asking about already allowed network rules
    (LP: #1380367)
  - make utils offer abstractions for network rules (LP: #1380367)
  - make libapparmor understand logs generated by syslog-ng
    (LP: #1399027)
  - stop python utilities from adding duplicate quotes (LP: #1328707)
  - work around aa-cleanprof crashes (LP: #1382236)
  - other bug fixes, performance improvements, and testcases added to
    the python utils.
  - policy updates for dnsmasq, nscd, and others
  - translation updates
* Partial sync with debian apparmor package:
  - debian/apparmor-profiles.install: add additional dovecot and
    smbldap-useradd profiles
  - debian/control: fix typo in apparmor-docs description, fix file
    overwrite issue with python-apparmor
  - debian/rules: improved repeat-build cleanup logic.
  - Add Turkish translation of debconf messages. Thanks to
    Mert Dirik <mertdirik@gmail.com> for the patch!
* debian/rules: remove no longer needed references to PERLDIR when
  installing from utils/

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
# The operating mode: yast or text, text by default
29
29
UI_mode = 'text'
30
30
 
 
31
# If Python3, wrap input in raw_input so make check passes
 
32
if not 'raw_input' in dir(__builtins__): raw_input = input
 
33
 
31
34
ARROWS = {'A': 'UP', 'B': 'DOWN', 'C': 'RIGHT', 'D': 'LEFT'}
32
35
 
33
36
def getkey():
173
176
    if UI_mode == 'text':
174
177
        readline.set_startup_hook(lambda: readline.insert_text(default))
175
178
        try:
176
 
            if sys.version_info[0] >= 3:
177
 
                string = input('\n' + text)
178
 
            else:
179
 
                string = raw_input('\n' + text)
 
179
            string = raw_input('\n' + text)
180
180
        except EOFError:
181
181
            string = ''
182
182
        finally: