diff options
Diffstat (limited to 'meta/lib/oe/terminal.py')
| -rw-r--r-- | meta/lib/oe/terminal.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index 71d8a43410..4c1e318c7c 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py | |||
| @@ -47,7 +47,7 @@ class Terminal(Popen): | |||
| 47 | 47 | ||
| 48 | class XTerminal(Terminal): | 48 | class XTerminal(Terminal): |
| 49 | def __init__(self, sh_cmd, title=None, env=None, d=None): | 49 | def __init__(self, sh_cmd, title=None, env=None, d=None): |
| 50 | Terminal.__init__(self, sh_cmd, title, env) | 50 | Terminal.__init__(self, sh_cmd, title, env, d) |
| 51 | if not os.environ.get('DISPLAY'): | 51 | if not os.environ.get('DISPLAY'): |
| 52 | raise UnsupportedTerminal(self.name) | 52 | raise UnsupportedTerminal(self.name) |
| 53 | 53 | ||
| @@ -105,6 +105,21 @@ class Screen(Terminal): | |||
| 105 | else: | 105 | else: |
| 106 | logger.warn(msg) | 106 | logger.warn(msg) |
| 107 | 107 | ||
| 108 | class Custom(Terminal): | ||
| 109 | command = 'false' # This is a placeholder | ||
| 110 | priority = 3 | ||
| 111 | |||
| 112 | def __init__(self, sh_cmd, title=None, env=None, d=None): | ||
| 113 | self.command = d and d.getVar('OE_TERMINAL_CUSTOMCMD', True) | ||
| 114 | if self.command: | ||
| 115 | if not '{command}' in self.command: | ||
| 116 | self.command += ' {command}' | ||
| 117 | Terminal.__init__(self, sh_cmd, title, env, d) | ||
| 118 | logger.warn('Custom terminal was started.') | ||
| 119 | else: | ||
| 120 | logger.debug(1, 'No custom terminal (OE_TERMINAL_CUSTOMCMD) set') | ||
| 121 | raise UnsupportedTerminal('OE_TERMINAL_CUSTOMCMD not set') | ||
| 122 | |||
| 108 | 123 | ||
| 109 | def prioritized(): | 124 | def prioritized(): |
| 110 | return Registry.prioritized() | 125 | return Registry.prioritized() |
