~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to bin/ubiquity-dm

  • Committer: Evan Dandrea
  • Date: 2010-12-16 16:12:36 UTC
  • Revision ID: evan.dandrea@canonical.com-20101216161236-czwldtuyccwuj369
PEP-8, deprecated exception style and has_key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
            except ImportError:
122
122
                pass
123
123
        else:
124
 
            raise AttributeError, ('No frontend available; tried %s' %
125
 
                                   ', '.join(frontend_names))
 
124
            raise AttributeError('No frontend available; tried %s' %
 
125
                                 ', '.join(frontend_names))
126
126
 
127
127
        db = DebconfCommunicator('ubiquity', cloexec=True)
128
128
        try:
241
241
                    if type(status) is int and status != 0:
242
242
                        if plymouth_running:
243
243
                            subprocess.call(['plymouth', 'quit'])
244
 
                        raise XStartupError, \
245
 
                            "X server exited with return code " + str(status)
 
244
                        raise XStartupError('X server exited with return code '
 
245
                                            + str(status))
246
246
                    if timeout == 0:
247
247
                        if plymouth_running:
248
248
                            subprocess.call(['plymouth', 'quit'])
249
 
                        raise XStartupError, \
250
 
                            "X server failed to start after 60 seconds"
 
249
                        raise XStartupError('X server failed to start after 60'
 
250
                                            ' seconds')
251
251
                    time.sleep(1)
252
252
                    timeout -= 1
253
253
                if plymouth_running:
353
353
            elif osextras.find_on_path('openbox-lubuntu'):
354
354
                wm_cmd = ['openbox-lubuntu']
355
355
            else:
356
 
                raise MissingProgramError, \
357
 
                    ("No window manager found (tried metacity, xfwm4, "
358
 
                     "matchbox-window-manager, openbox-lubuntu)")
 
356
                raise MissingProgramError('No window manager found (tried '
 
357
                    'metacity, xfwm4, matchbox-window-manager, '
 
358
                    'openbox-lubuntu)')
359
359
            wm = subprocess.Popen(wm_cmd,
360
360
                stdin=null, stdout=logfile, stderr=logfile,
361
361
                **maybe_drop_privileges)