CQ
This commit is contained in:
parent
e2664310f3
commit
9f1a408a7a
14 changed files with 18 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
# pylint: disable=singleton-comparison
|
# pylint: disable=singleton-comparison
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
@ -35,12 +35,13 @@ class Config:
|
||||||
def load(self, config_pathname):
|
def load(self, config_pathname):
|
||||||
self._cfg.read(config_pathname)
|
self._cfg.read(config_pathname)
|
||||||
|
|
||||||
def _split_key(self, key: ConfigParameter):
|
@staticmethod
|
||||||
|
def _split_key(key: ConfigParameter):
|
||||||
section, param = str(key.value).split(".")
|
section, param = str(key.value).split(".")
|
||||||
if not param:
|
if not param:
|
||||||
param = section
|
param = section
|
||||||
section = ""
|
section = ""
|
||||||
return (section, param)
|
return section, param
|
||||||
|
|
||||||
def exists(self, key: ConfigParameter):
|
def exists(self, key: ConfigParameter):
|
||||||
section, param = self._split_key(key)
|
section, param = self._split_key(key)
|
||||||
|
@ -77,8 +78,8 @@ class Config:
|
||||||
def check(self):
|
def check(self):
|
||||||
for key in ConfigParameter:
|
for key in ConfigParameter:
|
||||||
if not self.get(key):
|
if not self.get(key):
|
||||||
return (False, key.value)
|
return False, key.value
|
||||||
return (True, None)
|
return True, None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
dict_repr = {}
|
dict_repr = {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from stacosys.service import rss
|
from stacosys.service import rss
|
||||||
|
|
Loading…
Add table
Reference in a new issue