# @PydevCodeAnalysisIgnore import sys import os import arrow import pandas as pd from goerr import Err from dataswim import Ds import ghobserver from ghobserver import db, charts from ghobserver.notify import notify err = Err() def now(): now = arrow.utcnow() date = now.format('YYYY-MM-DDTHH:mm:ss') + "Z" return date def write_file(filepath, content): filex = open(filepath, "w") filex.write(content) filex.close() def no_data(ds, reposlug, timeframe): filename = reposlug.replace("-", "_") + "_" + timeframe + ".html" filepath = ds.report_path + "/" + filename content = '<div style="font-family:arial;text-align:center;' \ 'font-size:220%;color:lightgrey;margin-top:4em">'
def newerr(): err = Err() err.test_errs_mode = True return err
def err(self, *args): """ Handle an error """ Err().new(*args)
from goerr import Err err = Err() try: import foobar except ImportError as e: err.panic(e)