/usr/lib/python2.7/dist-packages/MLBviewer/mlbLog.py is in mlbviewer 2015.sf.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/usr/bin/env python
# mlbviewer is free software; you can redistribute it and/or modify
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, Version 2.
#
# mlbviewer 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.
#
# For a copy of the GNU General Public License, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA
import urllib
import urllib2
import re
import time
from datetime import datetime
import cookielib
import os
import subprocess
import select
from copy import deepcopy
import sys
from mlbProcess import MLBprocess
from mlbConstants import *
class MLBLog:
def __init__(self,logfile):
self.logfile = logfile
self.log = None
def open(self):
self.log = open(self.logfile,"a")
def close(self):
if self.log is not None:
self.log.close()
self.log = None
def flush(self):
pass
def write(self,logmsg):
ts=datetime.now().strftime('%m/%d %H:%M | ')
if self.log is None:
self.open()
self.log.write(ts + logmsg + '\n')
self.close()
|