Esempio n. 1
0
 def update_11():
     ''' Add search with year option to indexers in config '''
     config.load()
     for indexer in core.CONFIG['Indexers']['TorzNab'].values():
         if len(indexer) == 3:
             indexer.append(False)
     config.write(core.CONFIG)
Esempio n. 2
0
 def update_11():
     ''' Add category column to MOVIES '''
     config.load()
     for indexer in core.CONFIG['Indexers']['TorzNab'].values():
         if len(indexer) == 3:
             indexer.append(False)
     config.write(core.CONFIG)
Esempio n. 3
0
def main():
    """
    The main context of the application
    """
    try:
        parser = argparse.ArgumentParser(
            description='Evaluate JMeter Test Plan')
        required_named = parser.add_argument_group('mandatory arguments')
        required_named.add_argument("-f",
                                    "--file",
                                    dest="jmxfile",
                                    help="Add JMeter Test Plan file path")
        args = parser.parse_args()
        jmx = args.jmxfile

        # Loads base configuration from config.yaml
        config.load()

        with open(jmx) as f:
            parse_jmx(jmx)

    except FileNotFoundError as e:
        print_message(message_color=Colors.red,
                      message=f"An error occured during JEval execution: "
                      f"{e.strerror} ({e.filename})")
Esempio n. 4
0
    def load_fits(self, filename):
        """ Load collection of fits from YAML file.
            @param filename str: path of file containing fits in YAML format

            @return dict: validated fit dictionary with function references and parameter objects
        """
        user_fits = OrderedDict()
        fits = load(filename)
        return self.validate_load_fits(fits)
Esempio n. 5
0
    def load_fits(self, filename):
        """ Load collection of fits from YAML file.
            @param filename str: path of file containing fits in YAML format

            @return dict: validated fit dictionary with function references and parameter objects
        """
        if not filename:
            return {'1d': dict(), '2d': dict(), '3d': dict()}
        fits = load(filename)
        return self.validate_load_fits(fits)
Esempio n. 6
0
 def __init__(self, configPath):
     self.config = config.load(configPath)
     if self.config.operators:
         self.operators = Operator(self.config.operators)
     if self.config.store:
         self.store = store.get_store(self.config.store)
     if self.config.queue:
         # print("---> 1", self.config.queue)
         self.queue = Queue.make(self.config.queue)
     if self.config.server:
         self.server = Server(self.config.server)
Esempio n. 7
0
        core.POSTER_DIR = os.path.join(core.USERDATA, 'posters')
        
    # set up db connection
    from core import sqldb
    core.sql = sqldb.SQL()
    core.sql.update_database()

    # set up config file on first launch
    from core import config
    if not os.path.isfile(core.CONF_FILE):
        print('\033[33m## Config file not found. Creating new basic config {}. Please review settings. \033[0m'.format(core.CONF_FILE))
        config.new_config()
    else:
        print('Config file found, merging any new options.')
        config.merge_new_options()
    config.load()

    # Set up logging
    from core import log
    log.start(core.LOG_DIR, passed_args.stdout or False)
    logging = logging.getLogger(__name__)
    cherrypy.log.error_log.propagate = True
    cherrypy.log.access_log.propagate = False

    # clean mako cache
    try:
        print('Clearing Mako cache.')
        shutil.rmtree(core.MAKO_CACHE)
    except FileNotFoundError:  # noqa: F821 : Flake8 doesn't know about some built-in exceptions
        pass
    except Exception as e:
Esempio n. 8
0
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Startup script
import sys

from core import config
from core import main
from core import print_verbose

if __name__ == "__main__":
    # Build the config to use
    use_config = config.load(sys.argv[1:])
    print_verbose(use_config)
    main.go(use_config)

# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
Esempio n. 9
0
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Startup script
import sys

from core import config
from core import main
from core import print_verbose

if __name__ == "__main__":
    # Build the config to use
    use_config = config.load(sys.argv[1:])
    print_verbose(use_config)
    main.go(use_config)

# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4