Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-10-09 10:22:20 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-10-09 10:22:20 (GMT)
commitfc6ded013f0fb7b31429e6652def505fd1678199 (patch)
treecbc2b9f30762cf993129cfb77f771f8d28589451 /sugar
parent177ee7220ac5cb4b6d9b8367ef10f2fa83103a49 (diff)
Remove activity services creation.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/util.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/sugar/util.py b/sugar/util.py
index 2780427..8a3fb4a 100644
--- a/sugar/util.py
+++ b/sugar/util.py
@@ -73,53 +73,6 @@ def validate_activity_id(actid):
return False
return True
-class _ServiceParser(ConfigParser):
- def optionxform(self, option):
- return option
-
-def write_service(name, bin, path):
- """Write a D-BUS service definition file
-
- These are written by the bundleregistry when
- a new activity is registered. They bind a
- D-BUS bus-name with an executable which is
- to provide the named service.
-
- name -- D-BUS service name, must be a valid
- filename/D-BUS name
- bin -- executable providing named service
- path -- directory into which to write the
- name.service file
-
- The service files themselves are written using
- the _ServiceParser class, which is a subclass
- of the standard ConfigParser class.
- """
- service_cp = _ServiceParser()
- section = 'D-BUS Service'
- service_cp.add_section(section)
- service_cp.set(section, 'Name', name)
- service_cp.set(section, 'Exec', bin)
-
- dest_filename = os.path.join(path, name + '.service')
- fileobject = open(dest_filename, 'w')
- service_cp.write(fileobject)
- fileobject.close()
-
-def delete_service(name, path):
- """Delete a D-BUS service definition file
-
- Deletes a D-BUS service file previously
- created by write_service().
-
- name -- D-BUS service name, must be a valid
- filename/D-BUS name
- path -- directory containing the name.service
- file
- """
-
- os.remove(os.path.join(path, name + '.service'))
-
def set_proc_title(title):
"""Sets the process title so ps and top show more
descriptive names. This does not modify argv[0]