openplotter-maiana/openplotterMaiana/maianaPreUninstall.py
2021-10-31 13:53:27 +01:00

37 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python3
# This file is part of Openplotter.
# Copyright (C) 2021 by Sailoog <https://github.com/openplotter/openplotter-maiana>
#
# Openplotter 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 2 of the License, or
# any later version.
# Openplotter 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 Openplotter. If not, see <http://www.gnu.org/licenses/>.
import os
from openplotterSettings import conf
from openplotterSettings import language
def main():
conf2 = conf.Conf()
currentdir = os.path.dirname(os.path.abspath(__file__))
currentLanguage = conf2.get('GENERAL', 'lang')
package = 'openplotter-maiana'
language.Language(currentdir, package, currentLanguage)
print(_('Removing version...'))
try:
conf2.set('APPS', 'maiana', '')
print(_('DONE'))
except Exception as e: print(_('FAILED: ')+str(e))
if __name__ == '__main__':
main()