Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/util.py')
-rw-r--r--sugar/util.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/sugar/util.py b/sugar/util.py
index 5f01848..2780427 100644
--- a/sugar/util.py
+++ b/sugar/util.py
@@ -106,6 +106,20 @@ def write_service(name, bin, path):
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]