Ejemplo n.º 1
0
# 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/gpl.txt>.
# Also avalable in /usr/share/common-licenses/GPL on Debian systems
# or /usr/share/licenses/common/GPL3/license.txt on ArchLinux

from scal3 import logger

log = logger.get()

from os.path import join
from subprocess import Popen, PIPE

from typing import List, Tuple

from pygit2 import (
    Repository,
    GIT_SORT_TIME,
    GIT_SORT_TOPOLOGICAL,
    GIT_SORT_REVERSE,
)

from scal3.utils import toStr, toBytes
from scal3.time_utils import getEpochFromJd, encodeJd
Ejemplo n.º 2
0
		pass
	activeCalTypes = inactiveCalTypes = None
	calTypes.update()


def saveConf():
	global activeCalTypes, inactiveCalTypes
	activeCalTypes, inactiveCalTypes = (
		calTypes.activeNames,
		calTypes.inactiveNames,
	)
	saveModuleJsonConf(__name__)
	activeCalTypes = inactiveCalTypes = None


log = logger.get()


def myRaise(File=None):
	typ, value, tback = sys.exc_info()
	text = "line %s: %s: %s\n" % (
		tback.tb_lineno,
		typ.__name__,
		value,
	)
	if File:
		text = "File \"%s\", " % File + text
	log.error(text)


# ____________________________________________________________________ #