diff options
-rw-r--r-- | pygtk_postinstall.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py index 5690096f..471c4b23 100644 --- a/pygtk_postinstall.py +++ b/pygtk_postinstall.py @@ -58,23 +58,14 @@ def create_shortcuts(): if os.path.isfile(pygtk_doc_link): os.remove(pygtk_doc_link) create_shortcut(doc_url,'PyGTK Documentation',pygtk_doc_link) + file_created(pygtk_doc_link) homepage_link = os.path.join(pygtk_shortcuts, "PyGTK Home.lnk") if os.path.isfile(homepage_link): os.remove(homepage_link) create_shortcut("http://www.pygtk.org",'PyGTK Homepage',homepage_link) - -def remove_shortcuts(): - pygtk_shortcuts = os.path.join( - get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK') - os.remove(os.path.join(pygtk_shortcuts,'PyGTK Documentation.lnk')) - os.remove(os.path.join(pygtk_shortcuts,'PyGTK Home.lnk')) - try: - os.rmdir(pygtk_shortcuts) - except OSError, e: - # Directory is not empty, so leave it like that ! - pass + file_created(homepage_link) if len(sys.argv) == 2: if sys.argv[1] == "-install": @@ -84,5 +75,4 @@ if len(sys.argv) == 2: # TODO: Add an installer option for shortcut creation # create_shortcuts() print __doc__ - elif sys.argv[1] == "-remove": - remove_shortcuts() + |