Rev 556 | Rev 559 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 556 | Rev 558 | ||
|---|---|---|---|
| Line 135... | Line 135... | ||
| 135 | dlgargs.append(val) |
135 | dlgargs.append(val) |
| 136 | dlgargs += args |
136 | dlgargs += args |
| 137 | os.execlp(self.dlgcmd,*dlgargs) |
137 | os.execlp(self.dlgcmd,*dlgargs) |
| 138 | 138 | ||
| 139 | os.close(outdesc) |
139 | os.close(outdesc) |
| - | 140 | ||
| - | 141 | try: |
|
| 140 | errout = os.fdopen(indesc,'r') |
142 | errout = os.fdopen(indesc,'r') |
| 141 | data = errout.read() |
143 | data = errout.read() |
| 142 | errout.close() |
144 | errout.close() |
| - | 145 | pid,status = os.wait() |
|
| 143 | 146 | except: |
|
| - | 147 | os.system('reset') # Reset terminal |
|
| 144 | pid,status = os.wait() |
148 | raise |
| - | 149 | ||
| 145 | if not os.WIFEXITED(status): |
150 | if not os.WIFEXITED(status): |
| - | 151 | os.system('reset') # Reset terminal |
|
| 146 | raise EOFError |
152 | raise EOFError |
| - | 153 | ||
| 147 | status = os.WEXITSTATUS(status) |
154 | status = os.WEXITSTATUS(status) |
| 148 | if status == 255: |
155 | if status == 255: |
| 149 | raise EOFError |
156 | raise EOFError |
| 150 | return status,data |
157 | return status,data |
| 151 | 158 | ||
| 152 | def yesno(self, text, default=None): |
159 | def yesno(self, text, default=None): |
| - | 160 | if text[-1] not in ('?',':'): |
|
| 153 | text = text + ':' |
161 | text = text + ':' |
| 154 | width = '50' |
162 | width = '50' |
| 155 | height = '5' |
163 | height = '5' |
| 156 | if len(text) < 48: |
164 | if len(text) < 48: |
| 157 | text = ' '*int(((48-len(text))/2)) + text |
165 | text = ' '*int(((48-len(text))/2)) + text |
| 158 | else: |
166 | else: |
| Line 402... | Line 410... | ||
| 402 | 410 | ||
| 403 | 411 | ||
| 404 | if os.path.exists(OUTPUT): |
412 | if os.path.exists(OUTPUT): |
| 405 | os.unlink(OUTPUT) |
413 | os.unlink(OUTPUT) |
| 406 | os.rename(TMPOUTPUT, OUTPUT) |
414 | os.rename(TMPOUTPUT, OUTPUT) |
| 407 | 415 | ||
| - | 416 | if not defmode and dlg.yesno('Rebuild kernel?') == 'y': |
|
| - | 417 | os.execlp('make','make','clean','all') |
|
| 408 | 418 | ||
| 409 | if __name__ == '__main__': |
419 | if __name__ == '__main__': |
| 410 | main() |
420 | main() |