Skip to content
Snippets Groups Projects
Commit a73f0273 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Remove frozen logging on windows

Because of the new build process this has become obsolete
we can now log on windows with a simple

´Gajim.exe > log.txt 2>&1´
parent 148655c5
No related branches found
No related tags found
No related merge requests found
......@@ -130,9 +130,6 @@ class GajimApplication(Gtk.Application):
configpaths.gajimpaths.init(
self.config_path, self.profile, self.profile_separation)
if hasattr(sys, 'frozen'):
self.frozen_logging(configpaths.gajimpaths.config_root)
from common import gajim
from common import check_paths
from common import exceptions
......@@ -311,38 +308,6 @@ class GajimApplication(Gtk.Application):
warnings.showwarning = warn_with_traceback
warnings.filterwarnings(action="always")
def frozen_logging(self, path):
import warnings
if not os.path.exists(path):
os.mkdir(path, 0o700)
class MyStd(object):
_file = None
_error = None
log_file = os.path.join(path, 'gajim.log')
def write(self, text):
if self._file is None and self._error is None:
try:
self._file = open(self.log_file, 'a')
except Exception as details:
self._error = details
if self._file is not None:
self._file.write(text)
self._file.flush()
def flush(self):
if self._file is not None:
self._file.flush()
def isatty(self):
return False
outerr = MyStd()
sys.stdout = outerr
sys.stderr = outerr
warnings.filterwarnings(action='ignore')
def add_actions(self):
''' Build Application Actions '''
from app_actions import AppActions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment