Logo Search packages:      
Sourcecode: nautilus-clamscan version File versions  Download package

uninstall.py

#!/usr/bin/env python
#Nautilus Clam scanner - https://launchpad.net/nautilus-clamscan
#Un-installer
#(c) Clement Lorteau <northern_lights@users.sourceforge.net>
#
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import sys
import os

print "Uninstalling nautilus-clamscan..."

#local uninstall
dir = os.path.expanduser("~/.nautilus/python-extensions")+"/nautilus-clamscan.py"
if os.path.exists(dir):
   os.remove(dir)
   print "Uninstalled local user's copy."
else:
   print "Did not find a local user's copy."

#system-wide uninstall
dir = "/usr/lib/nautilus/extensions-2.0/python/nautilus-clamscan.py"
if os.path.exists(dir):
   if not os.getuid():
      os.remove(dir)
      print "Uninstalled system-wide copy."
   else:
      print "You are not root, could not uninstall system-wide copy."
else:
   print "Did not find any system-wide copy."

Generated by  Doxygen 1.6.0   Back to index