Switch to using err()
This commit is contained in:
parent
327eadd84e
commit
08b2f70b20
18
terminator
18
terminator
|
@ -65,8 +65,8 @@ else:
|
||||||
try:
|
try:
|
||||||
import gobject, gtk, pango
|
import gobject, gtk, pango
|
||||||
except:
|
except:
|
||||||
print >> sys.stderr, _("You need to install the python bindings for " \
|
err (_("You need to install the python bindings for " \
|
||||||
"gobject, gtk and pango to run Terminator.")
|
"gobject, gtk and pango to run Terminator."))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ text/plain
|
||||||
|
|
||||||
if not self.command and not os.path.exists (shell):
|
if not self.command and not os.path.exists (shell):
|
||||||
# Give up, we're completely stuck
|
# Give up, we're completely stuck
|
||||||
print >> sys.stderr, _('unable to find a shell')
|
err (_('Unable to find a shell'))
|
||||||
gobject.timeout_add (100, self.terminator.closeterm, self)
|
gobject.timeout_add (100, self.terminator.closeterm, self)
|
||||||
return (-1)
|
return (-1)
|
||||||
|
|
||||||
|
@ -412,12 +412,12 @@ text/plain
|
||||||
dbg ('SEGBUG: Setting WINDOWID')
|
dbg ('SEGBUG: Setting WINDOWID')
|
||||||
os.putenv ('WINDOWID', '%s'%self._vte.get_parent_window().xid)
|
os.putenv ('WINDOWID', '%s'%self._vte.get_parent_window().xid)
|
||||||
|
|
||||||
dbg ('SEGBUG: Forking command: %s'%command)
|
dbg ('SEGBUG: Forking command: "%s" with args "%s", loglastlog = "%s", logwtmp = "%s", logutmp = "%s" and cwd "%s"'%(shell, args, login, update_records, update_records, self.cwd))
|
||||||
self._pid = self._vte.fork_command (command = shell, argv = args, envv = [], directory=self.cwd, loglastlog = login, logwtmp = update_records, logutmp = update_records)
|
self._pid = self._vte.fork_command (command = shell, argv = args, envv = [], loglastlog = login, logwtmp = update_records, logutmp = update_records, directory=self.cwd)
|
||||||
|
|
||||||
dbg ('SEGBUG: Forked command')
|
dbg ('SEGBUG: Forked command')
|
||||||
if self._pid == -1:
|
if self._pid == -1:
|
||||||
print >>sys.stderr, _('Unable to start shell: ') + shell
|
err (_('Unable to start shell: ') + shell)
|
||||||
return (-1)
|
return (-1)
|
||||||
|
|
||||||
def get_cwd (self):
|
def get_cwd (self):
|
||||||
|
@ -1387,7 +1387,7 @@ class Terminator:
|
||||||
|
|
||||||
if not sibling:
|
if not sibling:
|
||||||
# something is wrong, give up
|
# something is wrong, give up
|
||||||
print >> sys.stderr, "Error: %s is not a child of %s"%(widget, parent)
|
err ("Error: %s is not a child of %s"%(widget, parent))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
parent.remove(widget)
|
parent.remove(widget)
|
||||||
|
@ -1729,8 +1729,8 @@ if __name__ == '__main__':
|
||||||
command = options.execute
|
command = options.execute
|
||||||
|
|
||||||
if gtk.gdk.display_get_default() == None:
|
if gtk.gdk.display_get_default() == None:
|
||||||
print >> sys.stderr, _("You need to run terminator in an X environment. " \
|
err (_("You need to run terminator in an X environment. " \
|
||||||
"Make sure DISPLAY is properly set")
|
"Make sure DISPLAY is properly set"))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print 'profile_cb: settled on profile: "%s"'%options.profile
|
print 'profile_cb: settled on profile: "%s"'%options.profile
|
||||||
|
|
Loading…
Reference in New Issue