Flesh out --help. Detect if the specified profile doesn't exist

This commit is contained in:
Chris Jones 2007-08-31 20:33:39 +01:00
parent 8c4b656337
commit 893ccd0f6a

View File

@ -75,6 +75,11 @@ class TerminatorTerm:
self.profile = self.defaults['profile_dir'] + profile
self.gconf_client = gconf.client_get_default ()
if not self.gconf_client.dir_exists (self.profile):
print "Error, unable to find profile " + profile
sys.exit (2)
self.gconf_client.add_dir (self.profile, gconf.CLIENT_PRELOAD_RECURSIVE)
self.gconf_client.add_dir ('/apps/metacity/general', gconf.CLIENT_PRELOAD_RECURSIVE)
@ -444,7 +449,13 @@ class Terminator:
return True
def usage ():
print "Read a manual or something"
print """Terminator by Chris Jones <cmsj@tenshu.net
Usage: terminator [OPTION]...
-h, --help Show this usage information
-d, --debug Enable debugging
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
"""
if __name__ == '__main__':
debug = 0